YutaLin opened a new pull request, #3405:
URL: https://github.com/apache/datafusion-comet/pull/3405
## Which issue does this PR close?
Closes #3131
## Rationale for this change
Comet does not currently support the Spark years function, causing queries
using this function to fall back to Spark's JVM execution instead of running
natively on DataFusion.
This patch adds serialization support for `Years`, allowing Comet to
recognize the expression
## What changes are included in this PR?
* Map Spark `Years` expression to DataFusion `datepart('year, child)' and
cast to integer
* Implement `getSupportLevel` to restrict support type `DateType`,
`TimestampType` and `TimestampNTZType`
* Register the new handler in `QueryPlanSerde`
## How are these changes tested?
* Add unit test in `CometExpressionSerde` to verify `Years` expression is
identified correctly and serialized into Protobuf message.
* Add unit test to verify that `getSupportLevel` returns `Compatible` for
supported temporal types.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]