-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add native stringview support for RIGHT #11955
Add native stringview support for RIGHT #11955
Conversation
Pasting a possible implementation of
|
let string_array = as_string_view_array(&args[0])?; | ||
let n_array = as_int64_array(&args[1])?; | ||
|
||
let result = string_array |
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.
Code below is quite similar to the string_right
function, I wonder if it is possible to use the ArrayAccessor
to reuse the code:
https://github.com/apache/arrow-rs/blob/a693f0f9c37567b2b121e261fc0a4587776d5ca4/arrow-array/src/array/mod.rs#L438-L531
Similar to this pr: https://github.com/apache/datafusion/pull/11884/files#diff-e49633ca67d4035f244e96909aa4d9d9a484a933a7783bcdee3a6cf32dcd7ab8R76
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 the advice. I couldn't come up with a proper way to combine them but now I get it :)
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.
Thank you @Kev1n8 and @XiangpengHao -- very nice
02)--TableScan: test projection=[column1_utf8view] | ||
|
||
# Test outputs of RIGHT |
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.
👍
Which issue does this PR close?
Closes #11917
Rationale for this change
What changes are included in this PR?
Update signature of RIGHT to accept Utf8View and add some tests for that.
Are these changes tested?
yes
Are there any user-facing changes?
no