andygrove commented on code in PR #4660:
URL: https://github.com/apache/datafusion-comet/pull/4660#discussion_r3434297951


##########
spark/src/main/scala/org/apache/comet/serde/unixtime.scala:
##########
@@ -30,11 +30,19 @@ import 
org.apache.comet.serde.QueryPlanSerde.{exprToProtoInternal, optExprWithFa
 object CometFromUnixTime extends CometExpressionSerde[FromUnixTime] with 
CodegenDispatchFallback {
 
   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 getUnsupportedReasons(): Seq[String] = Seq(
+    "Only the default datetime format pattern `yyyy-MM-dd HH:mm:ss` is 
supported.")
+
+  override def getSupportLevel(expr: FromUnixTime): SupportLevel = {
+    if (expr.format != Literal(TimestampFormatter.defaultPattern())) {
+      Unsupported(Some("Only the default datetime pattern `yyyy-MM-dd 
HH:mm:ss` is supported"))

Review Comment:
   I think this change may prevent the codegen dispatch path from working.



-- 
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]

Reply via email to