[
https://issues.apache.org/jira/browse/CALCITE-7015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17951593#comment-17951593
]
Yu Xu commented on CALCITE-7015:
--------------------------------
[~nobigo] Currently Rules with deprecated annotation cannot run test success,
would error out:
{code:java}
> Task :core:compileTestJava
354/home/runner/work/calcite/calcite/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:10690:
warning: [deprecation] MINUS_TO_FILTER in CoreRules has been deprecated
355 .withRule(CoreRules.MINUS_TO_FILTER)
356 ^
357/home/runner/work/calcite/calcite/core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java:10700:
warning: [deprecation] MINUS_TO_FILTER in CoreRules has been deprecated
358 .withRule(CoreRules.MINUS_TO_FILTER)
359 ^
360error: warnings found and -Werror specified
361Note: Some input files use unchecked or unsafe operations.
362Note: Recompile with -Xlint:unchecked for details. {code}
so I perfer remove the annotation and had a deprecated on it.
> MinusToFilterRule should return empty Values when minus Non-Filter RelNode
> --------------------------------------------------------------------------
>
> Key: CALCITE-7015
> URL: https://issues.apache.org/jira/browse/CALCITE-7015
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.39.0
> Reporter: Yu Xu
> Assignee: Yu Xu
> Priority: Major
> Fix For: 1.40.0
>
>
> sql:
> {code:java}
> final String sql = "SELECT mgr, comm FROM emp WHERE mgr = 12\n"
> + "EXCEPT\n"
> + "SELECT mgr, comm FROM emp\n";
> sql(sql)
> .withPreRule(CoreRules.PROJECT_FILTER_TRANSPOSE)
> .withRule(CoreRules.MINUS_TO_FILTER)
> .check();{code}
> result:
> {code:java}
> LogicalMinus(all=[false])
> LogicalFilter(condition=[=($0, 12)])
> LogicalProject(MGR=[$3], COMM=[$6])
> LogicalTableScan(table=[[CATALOG, SALES, EMP]])
> LogicalProject(MGR=[$3], COMM=[$6])
> LogicalTableScan(table=[[CATALOG, SALES, EMP]]) {code}
> should better convert to:
> {code:java}
> LogicalValues(tuples=[[]]) {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)