-
Notifications
You must be signed in to change notification settings - Fork 190
[BUG] Agg pushdown not work with two equivalent count(FIELD) #4347
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingpushdownpushdown related issuespushdown related issues
Description
What is the bug?
source=accounts
| eval account_number_alias = account_number
| stats count(account_number), count(account_number_alias) as c2 by gender
Explain
{
"calcite": {
"logical": """LogicalSystemLimit(fetch=[10000], type=[QUERY_SIZE_LIMIT])
LogicalProject(count(account_number)=[$1], c2=[$2], gender=[$0])
LogicalAggregate(group=[{0}], count(account_number)=[COUNT($1)], c2=[COUNT($2)])
LogicalProject(gender=[$4], account_number=[$0], account_number_alias=[$0])
CalciteLogicalIndexScan(table=[[OpenSearch, accounts]])
""",
"physical": """EnumerableLimit(fetch=[10000])
EnumerableCalc(expr#0..2=[{inputs}], count(account_number)=[$t1], c2=[$t2], gender=[$t0])
EnumerableAggregate(group=[{0}], count(account_number)=[COUNT($1)], c2=[COUNT($1)])
CalciteEnumerableIndexScan(table=[[OpenSearch, accounts]], PushDownContext=[[PROJECT->[gender, account_number]], OpenSearchRequestBuilder(sourceBuilder={"from":0,"timeout":"1m","_source":{"includes":["gender","account_number"],"excludes":[]}}, requestedTotalSize=2147483647, pageSize=null, startFrom=0)])
"""
}
}
What is the expected behavior?
Two count aggregations should be pushed down.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpushdownpushdown related issuespushdown related issues
Type
Projects
Status
Done