-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix(functions): support Dictionary
for string and int functions
#7262
fix(functions): support Dictionary
for string and int functions
#7262
Conversation
chore: add more test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wonderful @appletreeisyellow -- the fix is so beautiful and the tests very well done. 🏅
I will plan to merge this later today unless anyone else has comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @appletreeisyellow and @liukun4515 |
🤔 I just tested this out in IOx and it looks like it still doesn't work for arrays create table foo(x varchar) as values ('foo'), ('bar');
create table foo_dict as select arrow_cast(x, 'Dictionary(Int32, Utf8)') as x from foo;
select upper(x) from foo_dict; Results in an internal error:
I will reopen #5471 |
TO be clear I think this PR is an improvement, it just isn't the entire fix |
Which issue does this PR close?
Closes #5471.
Rationale for this change
Running
upper(col)
wherecol
is a dictionary results in an internal error:Other functions like
length
andcharacter_length
also have the same issue. Here is a list of all the functions with the same issue:What changes are included in this PR?
Support
Dictionary
data type for string functions and int functionsAre these changes tested?
Yes, tests are added for all the functions listed above
Are there any user-facing changes?
User will be able to use
upper
function and other string and int functions wherecol
is a dictionary without problem