Anil Gupta Somisetty created CALCITE-7003:
---------------------------------------------

             Summary: Query rewrite with materialization doesn't work for below 
query
                 Key: CALCITE-7003
                 URL: https://issues.apache.org/jira/browse/CALCITE-7003
             Project: Calcite
          Issue Type: Bug
          Components: core
            Reporter: Anil Gupta Somisetty


Table A:
a string,
b string,
c string,
d integer
 
Materialization:
select a, b, c, sum(d) from tabA group by a, b, c
Query: 
select upper(a), b, c, sum(d) from tabA where c = 'abc' group by upper(a), b, c
 
My above query rewrite with materialization doesn't happen and I figured out it 
is because of the optimization at 
[https://github.com/apache/calcite/blob/19ce56761e0b377f2b3e1d7286bcde969ed8e8db/core/src/main/java/org/apache/calcite/rel/rules/materialize/MaterializedViewRule.java#L482]
 made in commit 
[https://github.com/apache/calcite/commit/aa25dcbe565196fb6b78149042ee817427ed4f68]
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to