feat: Support Spark expression hours_of_time#3615
Conversation
| } | ||
| } | ||
|
|
||
| def hoursOfTimeToProto( |
There was a problem hiding this comment.
It might make more sense to place hoursOfTimeToProto alongside the existing CometHour handler in datetime.scala, since that's where the Hour serde already lives.
There was a problem hiding this comment.
Thanks @andygrove for the feedback. I'll prioritize completing secondsoftime first since there are components we can share between the two.
|
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days. |
|
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days. |
|
Closing in favor of #4860, which supersedes this PR. |
Which issue does this PR close?
Closes #3126
Rationale for this change
Comet previously did not support the Spark
HourOfTimeexpression, so queries using hour(time_expr) could fall back to JVM execution instead of running natively.What changes are included in this PR?
This change adds a Serde handler for HourOfTime that reuses the existing Hour protobuf and Rust implementation, ensuring consistent behavior while avoiding new native code paths.
How are these changes tested?
Added a Scala unit test HourOfTime expression support in CometExpressionSuite
./mvnw test -Dsuites="org.apache.comet.CometSqlFileTestSuite hour,org.apache.comet.CometExpressionSuite hour" -Dtest=none./mvnw clean compile -DskipTests