-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[datafusion-spark] Add Spark-compatible char
expression
#15994
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
base: main
Are you sure you want to change the base?
Conversation
@shehabgamin @alamb fyi |
Thank you for mention! ❤️ |
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.
🚀
fn chr(args: &[ArrayRef]) -> Result<ArrayRef> { | ||
let integer_array = as_int64_array(&args[0])?; | ||
|
||
// first map is the iterator, second is for the `Option<_>` |
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 think this part can be more optimal by using Stringbuilder
(like this) 🤔
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. I filed a tracking issue #16009
Which issue does this PR close?
Part of #15914
Rationale for this change
Add another Spark expression. This expression was originally contributed to Comet by @vaibhawvipul in apache/datafusion-comet#513
What changes are included in this PR?
Add new expression and tests
Are these changes tested?
Yes
Are there any user-facing changes?
No