You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/08/22 07:33:32 UTC
[GitHub] [calcite] jinxing64 edited a comment on issue #1324: [CALCITE-3203]
When matching materializations, match Project with child of Aggregate
jinxing64 edited a comment on issue #1324: [CALCITE-3203] When matching materializations, match Project with child of Aggregate
URL: https://github.com/apache/calcite/pull/1324#issuecomment-523786270
@hsyuan
Thanks for your kind reminder.
Actually I think this case can be covered by https://github.com/apache/calcite/pull/1384
The matching pattern proposed in this PR is like below:
```
query: Project(projects: [$0, *(2, $1)])
Aggregate(groupSet: {0}, groupSets: [{0}], calls: [SUM($1)])
Scan(table: [hr, emps])
target: Project(projects: [$0, *(2, $1), *(2, $2)])
Aggregate(groupSet: {0}, groupSets: [{0}], calls: [SUM($1), COUNT()])
Scan(table: [hr, emps])
```
The matching pattern proposed in https://github.com/apache/calcite/pull/1384 is like below:
```
query: Project(projects: [$0, +($1, 2)])
Project(projects: [$1, $3, $4])
Rel-A
target: Project(projects: [$1, +($3, 2)])
Rel-A
```
I think the second pattern is more general and I added the test case in this PR to https://github.com/apache/calcite/pull/1384
How do you think ? Which one is preferred ?
If https://github.com/apache/calcite/pull/1384 makes sense, it's great if you can shepherd and take a review. Then I will close this PR.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services