andygrove opened a new issue, #1824:
URL: https://github.com/apache/datafusion-comet/issues/1824

   ### Describe the bug
   
   
   ```
   2025-05-30T18:23:30.5178844Z 
   2025-05-30T18:23:30.6051928Z [info] - 
SPARK-32038: NormalizeFloatingNumbers should work on distinct aggregate *** 
FAILED *** (509 milliseconds)
   2025-05-30T18:23:30.6060839Z [info]   Results 
do not match for query:
   2025-05-30T18:23:30.6064796Z [info]   Timezone: 
sun.util.calendar.ZoneInfo[id="America/Los_Angeles",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=185,lastRule=java.util.SimpleTimeZone[id=America/Los_Angeles,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]
   2025-05-30T18:23:30.6068178Z [info]   Timezone 
Env: 
   2025-05-30T18:23:30.6068782Z [info]   
   2025-05-30T18:23:30.6069646Z [info]   == Parsed 
Logical Plan ==
   2025-05-30T18:23:30.6070401Z [info]   'Sort [1 
ASC NULLS FIRST], true
   2025-05-30T18:23:30.6071332Z [info]   +- 
'Aggregate [1], ['uid, unresolvedalias('count(distinct 'score))]
   2025-05-30T18:23:30.6072262Z [info]      +- 
'UnresolvedRelation [view], [], false
   2025-05-30T18:23:30.6072975Z [info]   
   2025-05-30T18:23:30.6073653Z [info]   == 
Analyzed Logical Plan ==
   2025-05-30T18:23:30.6074711Z [info]   uid: 
string, count(DISTINCT score): bigint
   2025-05-30T18:23:30.6075609Z [info]   Sort 
[uid#493096 ASC NULLS FIRST], true
   2025-05-30T18:23:30.6076871Z [info]   +- 
Aggregate [uid#493096], [uid#493096, count(distinct score#493097) AS 
count(DISTINCT score)#493101L]
   2025-05-30T18:23:30.6077970Z [info]      +- 
SubqueryAlias view
   2025-05-30T18:23:30.6078759Z [info]         +- 
View (`view`, [uid#493096, score#493097])
   2025-05-30T18:23:30.6079697Z [info]            
+- Project [_1#493091 AS uid#493096, _2#493092 AS score#493097]
   2025-05-30T18:23:30.6080601Z [info]             
  +- LocalRelation [_1#493091, _2#493092]
   2025-05-30T18:23:30.6081233Z [info]   
   2025-05-30T18:23:30.6081843Z [info]   == 
Optimized Logical Plan ==
   2025-05-30T18:23:30.6082618Z [info]   Sort 
[uid#493096 ASC NULLS FIRST], true
   2025-05-30T18:23:30.6083769Z [info]   +- 
Aggregate [uid#493096], [uid#493096, count(distinct score#493097) AS 
count(DISTINCT score)#493101L]
   2025-05-30T18:23:30.6085382Z [info]      +- 
Project [_1#493091 AS uid#493096, _2#493092 AS score#493097]
   2025-05-30T18:23:30.6086322Z [info]         +- 
LocalRelation [_1#493091, _2#493092]
   2025-05-30T18:23:30.6086946Z [info]   
   2025-05-30T18:23:30.6087532Z [info]   == 
Physical Plan ==
   2025-05-30T18:23:30.6088301Z [info]   
AdaptiveSparkPlan isFinalPlan=true
   2025-05-30T18:23:30.6089016Z [info]   +- == 
Final Plan ==
   2025-05-30T18:23:30.6089647Z [info]      *(4) 
CometColumnarToRow
   2025-05-30T18:23:30.6090590Z [info]      +- 
CometSort [uid#493096, count(DISTINCT score)#493101L], [uid#493096 ASC NULLS 
FIRST]
   2025-05-30T18:23:30.6091770Z [info]         +- 
AQEShuffleRead coalesced
   2025-05-30T18:23:30.6092510Z [info]            
+- ShuffleQueryStage 2
   2025-05-30T18:23:30.6093824Z [info]             
  +- CometColumnarExchange rangepartitioning(uid#493096 ASC NULLS FIRST, 5), 
ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=967521]
   2025-05-30T18:23:30.6096048Z [info]             
     +- *(3) HashAggregate(keys=[uid#493096], functions=[count(distinct 
score#493104)], output=[uid#493096, count(DISTINCT score)#493101L])
   2025-05-30T18:23:30.6097391Z [info]             
        +- *(3) ColumnarToRow
   2025-05-30T18:23:30.6098200Z [info]             
           +- AQEShuffleRead coalesced
   2025-05-30T18:23:30.6098788Z [info]             
              +- ShuffleQueryStage 1
   2025-05-30T18:23:30.6100300Z [info]             
                 +- CometColumnarExchange hashpartitioning(uid#493096, 5), 
ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=967449]
   2025-05-30T18:23:30.6102391Z [info]             
                    +- *(2) HashAggregate(keys=[uid#493096], 
functions=[partial_count(distinct score#493104)], output=[uid#493096, 
count#493107L])
   2025-05-30T18:23:30.6103719Z [info]             
                       +- *(2) CometColumnarToRow
   2025-05-30T18:23:30.6104995Z [info]             
                          +- CometHashAggregate [uid#493096, score#493104], 
[uid#493096, score#493104]
   2025-05-30T18:23:30.6106080Z [info]             
                             +- AQEShuffleRead coalesced
   2025-05-30T18:23:30.6106990Z [info]             
                                +- ShuffleQueryStage 0
   2025-05-30T18:23:30.6108493Z [info]             
                                   +- CometColumnarExchange 
hashpartitioning(uid#493096, score#493104, 5), ENSURE_REQUIREMENTS, 
CometColumnarShuffle, [plan_id=967350]
   2025-05-30T18:23:30.6110297Z [info]             
                                      +- *(1) HashAggregate(keys=[uid#493096, 
knownfloatingpointnormalized(normalizenanandzero(score#493097)) AS 
score#493104], functions=[], output=[uid#493096, score#493104])
   2025-05-30T18:23:30.6111750Z [info]             
                                         +- *(1) Project [_1#493091 AS 
uid#493096, _2#493092 AS score#493097]
   2025-05-30T18:23:30.6112619Z [info]             
                                            +- *(1) LocalTableScan [_1#493091, 
_2#493092]
   2025-05-30T18:23:30.6113492Z [info]   +- == 
Initial Plan ==
   2025-05-30T18:23:30.6114773Z [info]      
CometSort [uid#493096, count(DISTINCT score)#493101L], [uid#493096 ASC NULLS 
FIRST]
   2025-05-30T18:23:30.6115816Z [info]      +- 
CometColumnarExchange rangepartitioning(uid#493096 ASC NULLS FIRST, 5), 
ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=966971]
   2025-05-30T18:23:30.6116869Z [info]         +- 
HashAggregate(keys=[uid#493096], functions=[count(distinct score#493104)], 
output=[uid#493096, count(DISTINCT score)#493101L])
   2025-05-30T18:23:30.6117921Z [info]            
+- CometColumnarExchange hashpartitioning(uid#493096, 5), ENSURE_REQUIREMENTS, 
CometColumnarShuffle, [plan_id=966969]
   2025-05-30T18:23:30.6119888Z [info]             
  +- HashAggregate(keys=[uid#493096], functions=[partial_count(distinct 
score#493104)], output=[uid#493096, count#493107L])
   2025-05-30T18:23:30.6121130Z [info]             
     +- CometHashAggregate [uid#493096, score#493104], [uid#493096, 
score#493104]
   2025-05-30T18:23:30.6122069Z [info]             
        +- CometColumnarExchange hashpartitioning(uid#493096, score#493104, 5), 
ENSURE_REQUIREMENTS, CometColumnarShuffle, [plan_id=966946]
   2025-05-30T18:23:30.6123359Z [info]             
           +- HashAggregate(keys=[uid#493096, 
knownfloatingpointnormalized(normalizenanandzero(score#493097)) AS 
score#493104], functions=[], output=[uid#493096, score#493104])
   2025-05-30T18:23:30.6124492Z [info]             
              +- Project [_1#493091 AS uid#493096, _2#493092 AS 
score#493097]
   2025-05-30T18:23:30.6125725Z [info]             
                 +- LocalTableScan [_1#493091, _2#493092]
   2025-05-30T18:23:30.6126395Z [info]   
   2025-05-30T18:23:30.6126737Z [info]   == 
Results ==
   2025-05-30T18:23:30.6127057Z [info]   
   2025-05-30T18:23:30.6127496Z [info]   == 
Results ==
   2025-05-30T18:23:30.6127950Z [info]   !== 
Correct Answer - 2 ==   == Spark Answer - 2 ==
   2025-05-30T18:23:30.6128995Z [info]   !struct<> 
                  struct<uid:string,count(DISTINCT score):bigint>
   2025-05-30T18:23:30.6129997Z [info]    
[abellina,2]               [abellina,2]
   2025-05-30T18:23:30.6130548Z [info]   
![mithunr,1]                [mithunr,2] (QueryTest.scala:267)
   ```
   
   ### Steps to reproduce
   
   _No response_
   
   ### Expected behavior
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to