Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Impala 4.4.0
-
None
-
None
-
ghx-label-1
Description
Within DistributedPlanner.java, there are several place where Planner need to insert extra merge aggregation node. It require transferring HAVING conjuncts from preaggregation node to merge aggregation, unsetting limit, and recompute stats of preaggregation node. However, the stats recompute is not consistently done, and there might be an inefficient recompute happening.
Example of inefficient recomputes:
https://github.com/apache/impala/blob/88e0e4e8baa97f7fded12230b14232dc85cf6d79/fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java#L1074-L1077
Example of missing recompute for phase2AggNode:
https://github.com/apache/impala/blob/88e0e4e8baa97f7fded12230b14232dc85cf6d79/fe/src/main/java/org/apache/impala/planner/DistributedPlanner.java#L1143-L1168