apache / incubator-gluten

Gluten is a middle layer responsible for offloading JVM-based SQL engines' execution to native engines.
https://gluten.apache.org/
Apache License 2.0
1.22k stars 437 forks source link

[CH] `AdvancedExpandStep` generates invalid results #7959

Closed lgbo-ustc closed 4 days ago

lgbo-ustc commented 5 days ago

Backend

CH (ClickHouse)

Bug description

[Expected behavior] and [actual behavior].

When enable lazy expand for aggregation, the AdvancedExpandStep generates less row then expected if there is spilling.

  1. Detecting rows cardinality is wrong
  2. The aggregate params is not set correctly which make the spill invalid

Both should have been fixed in previour push, but somehow the code is not updated.

Spark version

None

Spark configurations

No response

System information

No response

Relevant logs

No response