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


##########
spark/src/main/scala/org/apache/comet/serde/unixtime.scala:
##########
@@ -29,12 +29,27 @@ 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 = {
+    expr.format match {
+      case Literal(fmt, _) =>
+        val formatStr = fmt.toString

Review Comment:
   Possible NPE if `fmt` is null



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