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
{{ message }}
Repository navigation
[FEATURE] Push down project operator into scan after aggregation push down #4230
Is your feature request related to a problem?
In current code, for PPL with stats command, there is always a project operator upon the scan operator after optimization, because we don't support pushing down project operator after aggregation as putting the fields in _source is no longer appropriate for aggregations DSL.
On the other hand, this project is needed as it adjusts the order of columns output from aggregation. In PPL, we expect the schema starts with aggregate value from aggregation while Calcite starts with group by columns.
PPL:
source=opensearch-sql_test_index_bank | stats count() by span(birthdate,1M)
FINAL PLAN:
EnumerableCalc(expr#0..1=[{inputs}], count()=[$t1], span(birthdate,1M)=[$t0])
CalciteEnumerableIndexScan(table=[[OpenSearch, opensearch-sql_test_index_bank]], PushDownContext=[[AGGREGATION->...
What solution would you like?
Implement this by updating the row type of scan operator.
Activity