iyupeng commented on pull request #14894:
URL: https://github.com/apache/flink/pull/14894#issuecomment-920562189
@sebastianliu
Hello Sebastian, will you continue this work for `local aggregate push down`?
We have an implementation of `local aggregate push down` too.
However, it's not so completed as this pull request for the lack of test
cases.
If this pull request is up-streamed, then we could add more work like
aggregates with arithmetical expressions:
For example:
```
select avg(l_extendedprice * l_discount) from lineitem group by l_suppkey;
== Abstract Syntax Tree ==
LogicalProject(EXPR$0=[$1])
+- LogicalAggregate(group=[{0}], EXPR$0=[AVG($1)])
+- LogicalProject(l_suppkey=[$2], $f1=[*($5, $6)])
+- LogicalTableScan(table=[[myhive, tpch_1g_snappy, lineitem]])
== Optimized Physical Plan ==
Calc(select=[EXPR$0])
+- HashAggregate(isMerge=[true], groupBy=[l_suppkey], select=[l_suppkey,
Final_AVG(sum$0, count$1) AS EXPR$0])
+- Exchange(distribution=[hash[l_suppkey]])
+- LocalHashAggregate(groupBy=[l_suppkey], select=[l_suppkey,
Partial_AVG($f1) AS (sum$0, count$1)])
+- Calc(select=[l_suppkey, *(l_extendedprice, l_discount) AS $f1])
+- TableSourceScan(table=[[myhive, tpch_1g_snappy, lineitem,
project=[l_suppkey, l_extendedprice, l_discount]]], fields=[l_suppkey,
l_extendedprice, l_discount])
```
Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]