-
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
fix bug with to_timestamp
and InitCap
logical serialization, add roundtrip test between expression and proto,
#8868
Conversation
|
||
let ctx = SessionContext::new(); | ||
let lit = Expr::Literal(ScalarValue::Utf8(None)); | ||
for builtin_fun in BuiltinScalarFunction::iter() { |
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.
Nice 👍
Interestingly, when I run this test on #8847 it fails with a different function
|
@@ -1588,7 +1588,7 @@ pub fn parse_expr( | |||
Ok(character_length(parse_expr(&args[0], registry)?)) | |||
} | |||
ScalarFunction::Chr => Ok(chr(parse_expr(&args[0], registry)?)), | |||
ScalarFunction::InitCap => Ok(ascii(parse_expr(&args[0], registry)?)), | |||
ScalarFunction::InitCap => Ok(initcap(parse_expr(&args[0], registry)?)), |
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.
datafusion/proto/Cargo.toml
Outdated
@@ -51,6 +51,7 @@ pbjson = { version = "0.6.0", optional = true } | |||
prost = "0.12.0" | |||
serde = { version = "1.0", optional = true } | |||
serde_json = { workspace = true, optional = true } | |||
strum = { version = "0.25.0", features = ["derive"] } |
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.
BTW since this module is only used in the tests, we should put it in the dev-dependencies
section, so everyone using datafusion-proto
does not need to compile it as well
I did this in 0a41737
to_timestamp
and InitCap
logical serialization, add roundtrip test between expression and proto,
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.
the strum
dependency is needed for the test only?
Yes, it is. @comphead |
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 thanks @Weijun-H
Which issue does this PR close?
Parts. #8847
Rationale for this change
When I worked on #8847, there were wrong function calls in
parse_expr
, the ci did not notify it.What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?