sam-1112 commented on code in PR #7750:
URL: https://github.com/apache/datafusion-comet/pull/7750#discussion_r4665863436


##########
spark/src/main/scala/org/apache/comet/serde/literals.scala:
##########
@@ -49,7 +49,9 @@ object CometLiteral extends CometExpressionSerde[Literal] 
with CometTypeShim wit
           expr.dataType,
           allowComplex = true,
           allowDuplicateStructFieldNames = false)
-      case ArrayType(elementType, _) => 
listLiteralElementSupported(elementType)
+      case arrayType: ArrayType =>
+        listLiteralElementSupported(arrayType.elementType) &&
+        supportedDataType(arrayType, allowComplex = true)

Review Comment:
   Could we pass `allowIntervals = true` here while retaining 
`listLiteralElementSupported` as the encoder gate? `supportedDataType` defaults 
to `allowIntervals = false`, so this new check also rejects previously 
supported `YearMonthIntervalType` array literals, including nested arrays. For 
example, `SELECT array(INTERVAL '1-2' YEAR TO MONTH, NULL) FROM tbl` now falls 
back to Spark instead of keeping the projection native. A focused Scala probe 
using the literal source and cached dependencies confirmed that these types 
change from `Compatible` on `branch-1.2` to `Unsupported` on this PR. The 
existing `CometLiteralSuite` test `a year-month interval array literal is 
serialized rather than declined` also expects this support to remain available. 
Could we run that test alongside the decimal-scale regressions?



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