-
Notifications
You must be signed in to change notification settings - Fork 234
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2242 +/- ##
=============================================
- Coverage 56.12% 44.08% -12.04%
- Complexity 976 1077 +101
=============================================
Files 119 145 +26
Lines 11743 13330 +1587
Branches 2251 2370 +119
=============================================
- Hits 6591 5877 -714
- Misses 4012 6447 +2435
+ Partials 1140 1006 -134 ☔ 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]>
@@ -136,7 +187,7 @@ object CometCast { | |||
// https://github.com/apache/datafusion-comet/issues/328 | |||
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.
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?