-
Notifications
You must be signed in to change notification settings - Fork 74
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
Added support for char_length #212
Conversation
test: added tests for string functions
} | ||
|
||
@ParameterizedTest | ||
@ValueSource(strings = {"vc32"}) |
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.
Using the ||
concatenation operator fails on CHAR columns with "IllegalArgumentException: Unable to convert call ||(char<16>?, char<16>?) at RexExpressionConverter.visitCall(RexExpressionConverter.java:83)
".
This should be investigated.
|
||
@ParameterizedTest | ||
@ValueSource(strings = {"c16", "vc32"}) | ||
void charLength(String column) throws Exception { |
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.
I made a very small change here: char_length
-> charLength
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.
6 months of *&#@$%! Go and I forgot good ol' Java conventions. What a shame! 😉
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.
Thanks for adding this mapping, and also for the additional tests for other string functions!
test: added tests for string functions
This PR adds a string-related scalar function mapping in
FunctionMappings
to support generating plans for queries that use thechar_length
function.It also introduces very basic unit tests for string-related functions, including the newly supported
char_length
one.