Skip to content

feat: Support Spark expression hour_of_time#3615

Open
0lai0 wants to merge 1 commit intoapache:mainfrom
0lai0:expression_hour_of_time
Open

feat: Support Spark expression hour_of_time#3615
0lai0 wants to merge 1 commit intoapache:mainfrom
0lai0:expression_hour_of_time

Conversation

@0lai0
Copy link
Contributor

@0lai0 0lai0 commented Mar 1, 2026

Which issue does this PR close?

Closes #3126

Rationale for this change

Comet previously did not support the Spark HourOfTime expression, 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support Spark expression: hours_of_time

1 participant