coderfender commented on code in PR #4111:
URL: https://github.com/apache/datafusion-comet/pull/4111#discussion_r3152055367
##########
spark/src/main/scala/org/apache/comet/serde/unixtime.scala:
##########
@@ -29,12 +29,20 @@ import
org.apache.comet.serde.QueryPlanSerde.{exprToProtoInternal, optExprWithIn
// https://github.com/apache/datafusion/issues/16594
object CometFromUnixTime extends CometExpressionSerde[FromUnixTime] {
+ override def getUnsupportedReasons(): Seq[String] = Seq(
+ "Only supports the default datetime format pattern `yyyy-MM-dd HH:mm:ss`")
+
override def getIncompatibleReasons(): Seq[String] = Seq(
- "Only supports the default datetime format pattern `yyyy-MM-dd HH:mm:ss`."
+
- " DataFusion's valid timestamp range differs from Spark" +
+ "DataFusion's valid timestamp range differs from Spark" +
" (https://github.com/apache/datafusion/issues/16594)")
- override def getSupportLevel(expr: FromUnixTime): SupportLevel =
Incompatible(None)
+ override def getSupportLevel(expr: FromUnixTime): SupportLevel = {
+ if (expr.format == Literal(TimestampFormatter.defaultPattern)) {
+ Incompatible(None)
+ } else {
+ Unsupported(None)
+ }
Review Comment:
I tried to leverage the right reason to fallback based on the pattern here
--
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]