2010YOUY01 commented on code in PR #23965:
URL: https://github.com/apache/datafusion/pull/23965#discussion_r3697782873


##########
datafusion/sqllogictest/test_files/aggregate_memory_spill.slt:
##########
@@ -58,13 +60,9 @@ FROM (
   GROUP BY (v * 7) % 100000
 )
 ----
-Plan with Metrics
-01)ProjectionExec: expr=[count(Int64(1))@0 as count(*), sum(total)@1 as 
sum(total)], metrics=[<slt:ignore>]
-02)--AggregateExec: mode=Single, gby=[], aggr=[count(Int64(1)), sum(total)], 
metrics=[<slt:ignore>]
-03)----ProjectionExec: expr=[sum(t.v)@1 as total], metrics=[<slt:ignore>]
-04)------AggregateExec: mode=Single, gby=[v@0 * 7 % 100000 as t.v * Int64(7) % 
Int64(100000)], aggr=[sum(t.v)], 
metrics=[<slt:ignore>spill_count=9,<slt:ignore>]
-05)--------ProjectionExec: expr=[value@0 as v], metrics=[<slt:ignore>]
-06)----------LazyMemoryExec: partitions=1, batch_generators=[generate_series: 
start=1, end=100000, batch_size=8192], metrics=[<slt:ignore>]
+<slt:ignore>
+04)------AggregateExec: mode=Single, gby=[v@0 * 7 % 100000 as t.v * Int64(7) % 
Int64(100000)], aggr=[sum(t.v)], 
metrics=[<slt:ignore>spilled_rows=<slt:ignore>K,<slt:ignore>]

Review Comment:
   Updated in 
[e242c5e](https://github.com/apache/datafusion/pull/23965/commits/e242c5e161124982b95eaf4df299bfb29db33419)
   
   Yes it's better to assert the exact value.
   
   If they're running with multiple partitions, then `spill_count` will be 
non-deterministic, however we're using `target_partitions=1` here, so it's 
deterministic, it's better to assert the exact metrics number.



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