ziting-openai commented on code in PR #5421:
URL: https://github.com/apache/datafusion-comet/pull/5421#discussion_r3874647470


##########
spark/src/main/scala/org/apache/comet/serde/aggregates.scala:
##########
@@ -106,6 +106,10 @@ object CometMax extends CometAggregateExpressionSerde[Max] 
{
 }
 
 object CometCount extends CometAggregateExpressionSerde[Count] {
+  // Both buffers are a single non-null Long. The AQE/count-bug restrictions 
documented on the
+  // reverse direction concern a Comet Final; retaining Spark's Final 
preserves those rewrites.
+  override def supportsNativePartialToSparkFinal(fn: Count): Boolean = true

Review Comment:
   Verified fixed at `46ad7eca3c45be564d4edf065ae3821167acf954`: native AVG 
explicitly rejects NativePartial-to-SparkFinal compatibility, the mixed 
aggregate requires every expression to be compatible, and four-partition 
COUNT+AVG regressions cover the former `(1, NULL)` result with AQE both enabled 
and disabled.



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