-
Notifications
You must be signed in to change notification settings - Fork 246
chore: Refactor Cast
serde to avoid code duplication
#2242
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2242 +/- ##
============================================
+ Coverage 56.12% 57.87% +1.75%
- Complexity 976 1290 +314
============================================
Files 119 146 +27
Lines 11743 13345 +1602
Branches 2251 2373 +122
============================================
+ Hits 6591 7724 +1133
- Misses 4012 4366 +354
- Partials 1140 1255 +115 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Cast
serde [WIP]Cast
serde to avoid code duplication
"Comet shuffle is not enabled: spark.comet.exec.shuffle.enabled is not enabled", | ||
"make_interval is not supported")), | ||
"Cast from CalendarIntervalType to String is not supported", | ||
"Comet shuffle is not enabled: spark.comet.exec.shuffle.enabled is not enabled")), |
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.
"Comet shuffle is not enabled: spark.comet.exec.shuffle.enabled is not enabled")), | |
"Comet shuffle is not enabled. To enable set spark.comet.exec.shuffle.enabled")), |
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.
This message comes from CometExecRule
. The message format wasn't modified as part of this PR, so changing the expected message here seems out of scope for this PR?
spark/src/main/scala/org/apache/comet/serde/QueryPlanSerde.scala
Outdated
Show resolved
Hide resolved
Co-authored-by: Oleks V <[email protected]>
Incompatible(Some("Not all valid formats are supported")) | ||
case _ => | ||
Unsupported | ||
Unsupported(Some(s"Cast from String to $toType is not supported")) |
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.
can see lots of Unsupported(Some(s"Cast from String to $toType is not supported")), canthis be a helper function?
def unsupportedCast(from, to) {
Unsupported(Some(s"Cast from $from to $to is not supported"))
}
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.
Updated. Thanks.
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 @andygrove it is lgtm
Thanks for the review @comphead |
Which issue does this PR close?
Closes #2239
Part of #2019
Rationale for this change
Make
Cast
a standard Comet expression that implementsCometExpressionSerde
rather than have special handling inQueryPlanSerde
.What changes are included in this PR?
COMET_CAST_ALLOW_INCOMPATIBLE
config.COMET_EXPR_ALLOW_INCOMPATIBLE
is used instead.How are these changes tested?