Flatten FunctionCall as direct fields in AggregationNode#Aggregation#12789
Flatten FunctionCall as direct fields in AggregationNode#Aggregation#12789hellium01 merged 3 commits intoprestodb:masterfrom
Conversation
presto-main/src/main/java/com/facebook/presto/sql/analyzer/QueryExplainer.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/planner/DesugarAtTimeZoneRewriter.java
Outdated
Show resolved
Hide resolved
...ain/java/com/facebook/presto/sql/planner/iterative/rule/PushAggregationThroughOuterJoin.java
Outdated
Show resolved
Hide resolved
...ain/java/com/facebook/presto/sql/planner/iterative/rule/PushAggregationThroughOuterJoin.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/planner/ExpressionExtractor.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Do we need a ticket number since it will be added back in following commit.
...java/com/facebook/presto/sql/planner/iterative/rule/TestPruneCountAggregationOverScalar.java
Outdated
Show resolved
Hide resolved
...java/com/facebook/presto/sql/planner/iterative/rule/TestPushAggregationThroughOuterJoin.java
Outdated
Show resolved
Hide resolved
...ain/src/test/java/com/facebook/presto/sql/planner/assertions/AggregationFunctionMatcher.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/planner/PlannerUtils.java
Outdated
Show resolved
Hide resolved
5a86a40 to
b108ac8
Compare
presto-main/src/test/java/com/facebook/presto/sql/planner/TestTypeValidator.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Add @SuppressWarnings("unchecked") if you want; but not necessary.
wenleix
left a comment
There was a problem hiding this comment.
"Add utility functions to convert SortOrder and OrderingScheme": LGTM, one nit.
presto-main/src/main/java/com/facebook/presto/sql/planner/PlannerUtils.java
Outdated
Show resolved
Hide resolved
|
Thanks for reviewing, yes, I can use Expression instead of template in In optimization rules, we will likely to add some standard aggregation functions (one example place is |
wenleix
left a comment
There was a problem hiding this comment.
"Flatten FunctionCall as direct fields in AggregationNode#Aggregation" . Some comments.
presto-main/src/main/java/com/facebook/presto/sql/planner/AnalyzedExpressionRewriter.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/planner/AnalyzedExpressionRewriter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
hmm... AnalyzedExpressionRewriter sounds a bit vague... let's talk in person quickly to figure out a better name (or decided that's the best name and we just need some comments.. 😃 )
There was a problem hiding this comment.
As discussed offline, will add a Deprecated Mark over there and keep the name as is.
...rc/main/java/com/facebook/presto/sql/planner/iterative/rule/AddIntermediateAggregations.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/facebook/presto/sql/planner/iterative/rule/AddIntermediateAggregations.java
Outdated
Show resolved
Hide resolved
...o-main/src/main/java/com/facebook/presto/sql/planner/optimizations/AggregationNodeUtils.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
hmmm.. should this expressionType be served as context? Let's talk in person.
There was a problem hiding this comment.
As discussed offline, will update to use a RewriterProvider
86ab56a to
92ab142
Compare
presto-main/src/main/java/com/facebook/presto/sql/planner/AnalyzedExpressionRewriter.java
Outdated
Show resolved
Hide resolved
presto-main/src/main/java/com/facebook/presto/sql/planner/AnalyzedExpressionRewriter.java
Outdated
Show resolved
Hide resolved
Previously these information is stored in `FunctionCall`, which is an `Expression`. This is required by following commits which will make AggregationNode to use `RowExpression` instead of `Expression`.
This is the first 3 commits of #12710