andygrove opened a new pull request, #4265:
URL: https://github.com/apache/datafusion-comet/pull/4265

   ## Which issue does this PR close?
   
   Backport of #4157 (closes #4123) to `branch-0.16`.
   
   ## Rationale for this change
   
   Spark 4.1.1 SQL coverage exposed a case where Comet allows native 
aggregation for grouping keys that contain nested `MapType` (for example 
`StructType(MapType(...))`). Although planning succeeds, downstream native 
sort/row-format handling does not support this shape, so the query fails at 
execution time instead of falling back to Spark during planning.
   
   This brings the fix to the `0.16` release line so the upcoming patch release 
does not crash on these grouping keys.
   
   ## What changes are included in this PR?
   
   Clean cherry-pick of commit \`7cf04c8e39d557ec895a6489b5eefd6076d648ac\` 
from \`main\`:
   
   - add a recursive \`containsMapType\` helper in \`CometBaseAggregate\`
   - make aggregate planning fall back when any grouping expression contains 
\`MapType\` directly or nested in \`StructType\`/\`ArrayType\`
   - add regression tests in \`CometAggregateSuite\` for grouping on 
\`Struct(Map(...))\` and \`Array(Map(...))\`
   
   ## How are these changes tested?
   
   Inherited from the original PR:
   
   - \`./mvnw test -Pspark-4.1 -Dtest=none 
-Dsuites="org.apache.comet.exec.CometAggregateSuite grouping on struct 
containing map should fallback to Spark"\`
   - \`./mvnw test -Pspark-4.1 -Dtest=none 
-Dsuites="org.apache.comet.exec.CometAggregateSuite group by array of map falls 
back to Spark (issue #4123)"\`


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