You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aggregation functions containing constants (e.g., approx_percentile) cannot be pushed down to TableScan nodes. This occurs because a ProjectNode with constant mappings exists between the AggregationNode and TableScanNode, which prevents the PushAggregationIntoTableScan rule from being triggered. Additionally, the PushProjectionIntoTableScan rule does not push constant projections down to connectors. This means the ProjectNode between the AggregationNode and TableScanNode cannot be eliminated.
The logical execution plan appears as follows:
AggregationNode
ProjectNode (constant mapping)
TableScanNode
I believe handling this case in PushAggregationIntoTableScan would be more appropriate. I have successfully implemented this by extracting and expanding constants into the AggregateFunction parameters within the SPI package in PushAggregationIntoTableScan. Perhaps I can submit a PR for this later.