File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
main/scala/org/apache/comet/serde
test/scala/org/apache/comet Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -558,6 +558,15 @@ object QueryPlanSerde extends Logging with CometExprShim {
558558 binding : Boolean ,
559559 conf : SQLConf ): Option [AggExpr ] = {
560560
561+ // Support Count(distinct single_value)
562+ // COUNT(DISTINCT x) - supported
563+ // COUNT(DISTINCT x, x) - supported through transition to COUNT(DISTINCT x)
564+ // COUNT(DISTINCT x, y) - not supported
565+ if (aggExpr.isDistinct && (aggExpr.aggregateFunction.prettyName.toLowerCase == " count" && aggExpr.aggregateFunction.children.length == 1 )) {
566+ withInfo(aggExpr, s " Distinct aggregate not supported for: $aggExpr" )
567+ return None
568+ }
569+
561570 val fn = aggExpr.aggregateFunction
562571 val cometExpr = aggrSerdeMap.get(fn.getClass)
563572 cometExpr match {
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ class CometFuzzAggregateSuite extends CometFuzzTestBase {
3030 if (usingDataSourceExec) {
3131 assert(1 == collectNativeScans(cometPlan).length)
3232 }
33+
34+ checkSparkAnswerAndOperator(sql)
3335 }
3436 }
3537
You can’t perform that action at this time.
0 commit comments