You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Anil Gupta Somisetty (Jira)" <ji...@apache.org> on 2025/05/08 08:01:00 UTC
[jira] [Created] (CALCITE-7003) Query rewrite with materialization doesn't work for below query
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)