-
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
Move bit_length and chr functions to datafusion_functions #9782
Conversation
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 for the contribution @PsiACE -- I think the only thing needed for this PR is to fix the expr_fn
parameter signature.
🚀
@@ -111,7 +111,7 @@ async fn test_fn_ascii() -> Result<()> { | |||
|
|||
#[tokio::test] | |||
async fn test_fn_bit_length() -> Result<()> { | |||
let expr = bit_length(col("a")); | |||
let expr = bit_length(vec![col("a")]); |
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.
since bit_length
only ever takes a single parameter, I think it would be better to keep this as a single expr
argument (to keep the UX nicer to call bit_length
).
If the function can take potentially different numbers of parameters, that is when Vec<Expr>
is more appropriate I think
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.
Signed-off-by: Chojan Shang <[email protected]>
Signed-off-by: Chojan Shang <[email protected]>
Signed-off-by: Chojan Shang <[email protected]>
Signed-off-by: Chojan Shang <[email protected]>
Signed-off-by: Chojan Shang <[email protected]>
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.
Looks great -- thank you @PsiACE . Very nicely done
Which issue does this PR close?
Closes #9534.
Rationale for this change
As part of #9285 the bit_length and chr string functions should be migrated to the new datafusion-functions crate in the new structure
What changes are included in this PR?
Move bit_length and chr functions to datafusion_functions
Are these changes tested?
yes
Are there any user-facing changes?
No