Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-20.1: sql: fix cast from string to array with width #50168

Merged

Conversation

RaduBerinde
Copy link
Member

Backport 1/1 commits from #50153.

/cc @cockroachdb/release


The code that performs a cast from string to array doesn't take into account the
width of the string type it is producing. This doesn't show up when the input is
a literal constant because the constant is first parsed as an array of (vanilla)
strings which is then subjected to a cast (to array of strings with width).

Fixes #50132.

Release note (bug fix): Fixed some cases of casting a string to a width-limited
string array.

@RaduBerinde RaduBerinde requested a review from otan June 12, 2020 23:33
@cockroach-teamcity
Copy link
Member

This change is Reviewable

The code that performs a cast from string to array doesn't take into
account the width of the string type it is producing. This doesn't
show up when the input is a literal constant because the constant is
first parsed as an array of (vanilla) strings which is then subjected
to a cast (to array of strings with width).

Fixes cockroachdb#50132.

Release note (bug fix): Fixed some cases where casting a string to a
width-limited string array was not truncating the string.
@RaduBerinde RaduBerinde merged commit bbde740 into cockroachdb:release-20.1 Jun 13, 2020
@RaduBerinde RaduBerinde deleted the backport20.1-50153 branch June 13, 2020 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants