You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "xzh_dz (Jira)" <ji...@apache.org> on 2021/05/27 07:09:00 UTC
[jira] [Created] (CALCITE-4624) When query contains complex
function, materialized view recognition fails
xzh_dz created CALCITE-4624:
-------------------------------
Summary: When query contains complex function, materialized view recognition fails
Key: CALCITE-4624
URL: https://issues.apache.org/jira/browse/CALCITE-4624
Project: Calcite
Issue Type: Wish
Reporter: xzh_dz
{code:java}
// code placeholder
org.apache.calcite.test.MaterializedViewSubstitutionVisitorTest#testComplexOverWindowFunction
@Test void testComplexOverWindowFunction() {
final String mv = ""
+ "select \"deptno\", cos(\"empid\"), row_number() OVER (PARTITION BY \"empid\")\n"
+ "from \"emps\"";
final String query = ""
+ "select cos(\"empid\"), row_number() OVER (PARTITION BY \"empid\"), \"deptno\"\n"
+ "from \"emps\"";
sql(mv, query).ok();
}
{code}
Exception:
{code:java}
// code placeholder
Materialized view failed to be matched by optimized results:Materialized view failed to be matched by optimized results:
java.lang.AssertionError: Materialized view failed to be matched by optimized results:
at org.apache.calcite.test.AbstractMaterializedViewTest.checkMaterialize(AbstractMaterializedViewTest.java:116) at org.apache.calcite.test.AbstractMaterializedViewTest.access$000(AbstractMaterializedViewTest.java:67) at org.apache.calcite.test.AbstractMaterializedViewTest$Sql.ok(AbstractMaterializedViewTest.java:229) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.apache.calcite.util.ImmutableBeans.lambda$makeDef$3(ImmutableBeans.java:299)
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)