comphead commented on code in PR #4015:
URL: https://github.com/apache/datafusion-comet/pull/4015#discussion_r3261968192
##########
spark/src/main/scala/org/apache/spark/sql/comet/operators.scala:
##########
@@ -1362,10 +1364,24 @@ trait CometBaseAggregate {
// We support {Partial, PartialMerge} mix; other combinations are rejected.
val multiMode = modes.size > 1 && modeSet != Set(Partial, PartialMerge)
// For a final mode HashAggregate, we only need to transform the
HashAggregate
- // if there is Comet partial aggregation.
+ // if there is Comet partial aggregation, unless all aggregates have
compatible
+ // intermediate buffer formats (safe for mixed Spark/Comet execution).
val sparkFinalMode = modes.contains(Final) &&
findCometPartialAgg(aggregate.child).isEmpty
- if (multiMode || sparkFinalMode) {
+ if (multiMode) {
+ return None
Review Comment:
`withInfo` ?
##########
spark/src/main/scala/org/apache/spark/sql/comet/operators.scala:
##########
@@ -1362,10 +1364,24 @@ trait CometBaseAggregate {
// We support {Partial, PartialMerge} mix; other combinations are rejected.
val multiMode = modes.size > 1 && modeSet != Set(Partial, PartialMerge)
// For a final mode HashAggregate, we only need to transform the
HashAggregate
- // if there is Comet partial aggregation.
+ // if there is Comet partial aggregation, unless all aggregates have
compatible
+ // intermediate buffer formats (safe for mixed Spark/Comet execution).
val sparkFinalMode = modes.contains(Final) &&
findCometPartialAgg(aggregate.child).isEmpty
- if (multiMode || sparkFinalMode) {
+ if (multiMode) {
+ return None
+ }
+
+ if (sparkFinalMode &&
+
!QueryPlanSerde.allAggsSupportMixedExecution(aggregate.aggregateExpressions)) {
+ return None
Review Comment:
`withInfo`
?
--
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]