unikdahal commented on code in PR #5414:
URL: https://github.com/apache/datafusion-comet/pull/5414#discussion_r3837101778


##########
spark/src/main/scala/org/apache/comet/DataTypeSupport.scala:
##########
@@ -54,8 +54,9 @@ trait DataTypeSupport {
           CalendarIntervalType =>
         true
       case StructType(fields) =>
-        fields.nonEmpty && fields.forall(f =>
-          isTypeSupported(f.dataType, f.name, fallbackReasons))
+        // A struct's `fields` can be empty -- e.g. Iceberg's `_partition` 
metadata column is
+        // exactly that on an unpartitioned table. It's still a value Comet 
can represent.
+        fields.forall(f => isTypeSupported(f.dataType, f.name, 
fallbackReasons))

Review Comment:
   Fixed. Rejects grouping keys containing an empty struct in both 
CometBaseAggregate.doConvert and the mirrored canAggregateBeConverted tag check 
(per its own WARNING comment). Added regression tests for GROUP BY and DISTINCT.



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