[CALCITE-6718] Optimize SubstitutionVisitor's splitFilter with early return and uniform simplification for equivalence checking #14242
Annotations
10 errors
DateRangeRulesTest.java#L701
0.1sec org.apache.calcite.rel.rules.DateRangeRulesTest > testExtractRewriteForInvalidMonthComparison()
java.lang.AssertionError: result mismatch (unknown as UNKNOWN): when applied to {$9=NULL},
AND(AND(>=($9, 2010-01-01 00:00:00), <($9, 2011-01-01 00:00:00)), AND(>=($9, 2010-01-01 00:00:00), <($9, 2010-02-01 00:00:00))) yielded NULL;
SEARCH($9, Sarg[[2010-01-01 00:00:00..2010-02-01 00:00:00); NULL AS FALSE]) yielded false
at org.apache.calcite.rex.RexSimplify.verify(RexSimplify.java:2177)
at org.apache.calcite.rex.RexSimplify.simplifyUnknownAs(RexSimplify.java:253)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:226)
at org.apache.calcite.rel.rules.DateRangeRulesTest.checkDateRange(DateRangeRulesTest.java:701)
at org.apache.calcite.rel.rules.DateRangeRulesTest.checkDateRange(DateRangeRulesTest.java:694)
at org.apache.calcite.rel.rules.DateRangeRulesTest.testExtractRewriteForInvalidMonthComparison(DateRangeRulesTest.java:334)
|
DateRangeRulesTest.java#L701
0.0sec org.apache.calcite.rel.rules.DateRangeRulesTest > testExtractYearMonthDayFromDateColumn()
java.lang.AssertionError: result mismatch (unknown as UNKNOWN): when applied to {$8=NULL},
AND(>=($8, 2011-01-01), AND(>=($8, 2011-01-01), <($8, 2020-01-01)), OR(AND(>=($8, 2011-02-01), <($8, 2011-03-01)), AND(>=($8, 2012-02-01), <($8, 2012-03-01)), AND(>=($8, 2013-02-01), <($8, 2013-03-01)), AND(>=($8, 2014-02-01), <($8, 2014-03-01)), AND(>=($8, 2015-02-01), <($8, 2015-03-01)), AND(>=($8, 2016-02-01), <($8, 2016-03-01)), AND(>=($8, 2017-02-01), <($8, 2017-03-01)), AND(>=($8, 2018-02-01), <($8, 2018-03-01)), AND(>=($8, 2019-02-01), <($8, 2019-03-01))), OR(AND(>=($8, 2012-02-29), <($8, 2012-03-01)), AND(>=($8, 2016-02-29), <($8, 2016-03-01)))) yielded NULL;
SEARCH($8, Sarg[[2012-02-29..2012-03-01), [2016-02-29..2016-03-01); NULL AS FALSE]) yielded false
at org.apache.calcite.rex.RexSimplify.verify(RexSimplify.java:2177)
at org.apache.calcite.rex.RexSimplify.simplifyUnknownAs(RexSimplify.java:253)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:226)
at org.apache.calcite.rel.rules.DateRangeRulesTest.checkDateRange(DateRangeRulesTest.java:701)
at org.apache.calcite.rel.rules.DateRangeRulesTest.checkDateRange(DateRangeRulesTest.java:694)
at org.apache.calcite.rel.rules.DateRangeRulesTest.testExtractYearMonthDayFromDateColumn(DateRangeRulesTest.java:139)
|
DateRangeRulesTest.java#L701
0.1sec org.apache.calcite.rel.rules.DateRangeRulesTest > testExtractYearMonthDayFromTimestampColumn()
java.lang.AssertionError: result mismatch (unknown as UNKNOWN): when applied to {$8=NULL},
AND(>=($8, 2011-01-01), AND(>=($8, 2011-01-01), <($8, 2020-01-01)), OR(AND(>=($8, 2011-02-01), <($8, 2011-03-01)), AND(>=($8, 2012-02-01), <($8, 2012-03-01)), AND(>=($8, 2013-02-01), <($8, 2013-03-01)), AND(>=($8, 2014-02-01), <($8, 2014-03-01)), AND(>=($8, 2015-02-01), <($8, 2015-03-01)), AND(>=($8, 2016-02-01), <($8, 2016-03-01)), AND(>=($8, 2017-02-01), <($8, 2017-03-01)), AND(>=($8, 2018-02-01), <($8, 2018-03-01)), AND(>=($8, 2019-02-01), <($8, 2019-03-01))), OR(AND(>=($8, 2012-02-29), <($8, 2012-03-01)), AND(>=($8, 2016-02-29), <($8, 2016-03-01)))) yielded NULL;
SEARCH($8, Sarg[[2012-02-29..2012-03-01), [2016-02-29..2016-03-01); NULL AS FALSE]) yielded false
at org.apache.calcite.rex.RexSimplify.verify(RexSimplify.java:2177)
at org.apache.calcite.rex.RexSimplify.simplifyUnknownAs(RexSimplify.java:253)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:226)
at org.apache.calcite.rel.rules.DateRangeRulesTest.checkDateRange(DateRangeRulesTest.java:701)
at org.apache.calcite.rel.rules.DateRangeRulesTest.checkDateRange(DateRangeRulesTest.java:694)
at org.apache.calcite.rel.rules.DateRangeRulesTest.testExtractYearMonthDayFromTimestampColumn(DateRangeRulesTest.java:160)
|
DateRangeRulesTest.java#L701
0.0sec org.apache.calcite.rel.rules.DateRangeRulesTest > testUnboundYearExtractRewrite()
java.lang.AssertionError: result mismatch (unknown as UNKNOWN): when applied to {$9=NULL},
AND(<($9, 2011-01-01 00:00:00), AND(>=($9, 2010-01-01 00:00:00), <($9, 2011-01-01 00:00:00)), AND(>=($9, 2010-05-01 00:00:00), <($9, 2010-06-01 00:00:00))) yielded NULL;
SEARCH($9, Sarg[[2010-05-01 00:00:00..2010-06-01 00:00:00); NULL AS FALSE]) yielded false
at org.apache.calcite.rex.RexSimplify.verify(RexSimplify.java:2177)
at org.apache.calcite.rex.RexSimplify.simplifyUnknownAs(RexSimplify.java:253)
at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:226)
at org.apache.calcite.rel.rules.DateRangeRulesTest.checkDateRange(DateRangeRulesTest.java:701)
at org.apache.calcite.rel.rules.DateRangeRulesTest.checkDateRange(DateRangeRulesTest.java:694)
at org.apache.calcite.rel.rules.DateRangeRulesTest.testUnboundYearExtractRewrite(DateRangeRulesTest.java:378)
|
RexProgramTest.java#L2312
0.0sec org.apache.calcite.rex.RexProgramTest > testSargMerge()
java.lang.AssertionError: result mismatch (unknown as UNKNOWN): when applied to {?0.int0=NULL},
AND(>(?0.int0, 5), <(?0.int0, 3)) yielded NULL;
false yielded false
at org.apache.calcite.rex.RexSimplify.verify(RexSimplify.java:2177)
at org.apache.calcite.rex.RexSimplify.simplifyUnknownAs(RexSimplify.java:253)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplifyAs(RexProgramTestBase.java:147)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplify3_(RexProgramTestBase.java:131)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplify3(RexProgramTestBase.java:118)
at org.apache.calcite.rex.RexProgramTest.testSargMerge(RexProgramTest.java:2312)
|
RexProgramTest.java#L975
0.2sec org.apache.calcite.rex.RexProgramTest > testSimplify()
java.lang.AssertionError: simplify(unknown as UNKNOWN): AND(<=(?0.h, 1), >(?0.h, 1))
Expected: with toString() is "<>(?0.h, ?0.h)"
but: toString() was "false"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplifyAs(RexProgramTestBase.java:148)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplify3_(RexProgramTestBase.java:131)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplify3(RexProgramTestBase.java:118)
at org.apache.calcite.rex.RexProgramTest.testSimplify(RexProgramTest.java:975)
|
RexProgramTest.java#L2642
0.0sec org.apache.calcite.rex.RexProgramTest > testSimplifyIsNotNullWithDeterministic()
java.lang.AssertionError: simplify(unknown as UNKNOWN): AND(OR(IS NOT NULL(DC()), >(?0.int2, 2)), IS NOT NULL(DC()))
Expected: with toString() is "AND(OR(IS NOT NULL(DC()), >(?0.int2, 2)), IS NOT NULL(DC()))"
but: toString() was "IS NOT NULL(DC())"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplifyAs(RexProgramTestBase.java:148)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplify3_(RexProgramTestBase.java:131)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplify2(RexProgramTestBase.java:110)
at org.apache.calcite.rex.RexProgramTest.testSimplifyIsNotNullWithDeterministic(RexProgramTest.java:2642)
|
RexProgramTest.java#L2118
0.1sec org.apache.calcite.rex.RexProgramTest > testSimplifyEqualityAndNotEqualityWithOverlapping()
java.lang.AssertionError: result mismatch (unknown as UNKNOWN): when applied to {?0.int0=NULL},
AND(=(?0.int0, 5), <>(?0.int0, 3)) yielded NULL;
AND(IS NOT NULL(?0.int0), =(?0.int0, 5)) yielded false
at org.apache.calcite.rex.RexSimplify.verify(RexSimplify.java:2177)
at org.apache.calcite.rex.RexSimplify.simplifyUnknownAs(RexSimplify.java:253)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplifyAs(RexProgramTestBase.java:147)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplify3_(RexProgramTestBase.java:131)
at org.apache.calcite.rex.RexProgramTestBase.checkSimplify(RexProgramTestBase.java:90)
at org.apache.calcite.rex.RexProgramTest.testSimplifyEqualityAndNotEqualityWithOverlapping(RexProgramTest.java:2118)
|
org.apache.calcite.test.CoreQuidemTest > test(String)[12%5D#L1
51.7sec org.apache.calcite.test.CoreQuidemTest > test(String)[12], [12] sql/sub-query.iq
org.opentest4j.AssertionFailedError: Files differ: /Users/runner/work/calcite/calcite/core/build/quidem/test/sql/sub-query.iq /Users/runner/work/calcite/calcite/core/build/resources/test/sql/sub-query.iq
967c967
< EnumerableCalc(expr#0..3=[{inputs}], expr#4=[IS FALSE($t2)], expr#5=[null:BOOLEAN], expr#6=[IS NOT NULL($t3)], expr#7=[AND($t4, $t5, $t6)], expr#8=[IS NOT NULL($t2)], expr#9=[IS NOT FALSE($t2)], expr#10=[AND($t8, $t6, $t9)], expr#11=[OR($t7, $t10)], SAL=[$t1], EXPR$1=[$t11])
---
> EnumerableCalc(expr#0..3=[{inputs}], expr#4=[IS FALSE($t2)], expr#5=[null:BOOLEAN], expr#6=[IS NOT NULL($t3)], expr#7=[AND($t4, $t5, $t6)], expr#8=[IS NOT NULL($t2)], expr#9=[AND($t8, $t6, $t2)], expr#10=[OR($t7, $t9)], SAL=[$t1], EXPR$1=[$t10])
1145c1145
< EnumerableCalc(expr#0..3=[{inputs}], expr#4=[IS FALSE($t2)], expr#5=[null:BOOLEAN], expr#6=[IS NOT NULL($t3)], expr#7=[AND($t4, $t5, $t6)], expr#8=[IS NOT NULL($t2)], expr#9=[IS NOT FALSE($t2)], expr#10=[AND($t8, $t6, $t9)], expr#11=[OR($t7, $t10)], SAL=[$t1], EXPR$1=[$t11])
---
> EnumerableCalc(expr#0..3=[{inputs}], expr#4=[IS FALSE($t2)], expr#5=[null:BOOLEAN], expr#6=[IS NOT NULL($t3)], expr#7=[AND($t4, $t5, $t6)], expr#8=[IS NOT NULL($t2)], expr#9=[AND($t8, $t6, $t2)], expr#10=[OR($t7, $t9)], SAL=[$t1], EXPR$1=[$t10])
at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
at app//org.junit.jupiter.api.Assertions.fail(Assertions.java:135)
at app//org.apache.calcite.test.QuidemTest.checkRun(QuidemTest.java:185)
at app//org.apache.calcite.test.QuidemTest.test(QuidemTest.java:238)
at app//org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
at app//org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at app//org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at app//org.junit.jupiter.engine.extension.SameThreadTimeoutInvocation.proceed(SameThreadTimeoutInvocation.java:45)
at app//org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
at app//org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
at app//org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestTemplateMethod(TimeoutExtension.java:94)
at app//org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
at app//org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
at app//org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at app//org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at app//org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at app//org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at app//org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
at app//org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
at app//org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at app//org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
at app//org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
at app//org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescr
|
org.apache.calcite.test.CoreQuidemTest > test(String)[33%5D#L1
13.3sec org.apache.calcite.test.CoreQuidemTest > test(String)[33], [33] sql/within-distinct.iq
org.opentest4j.AssertionFailedError: Files differ: /Users/runner/work/calcite/calcite/core/build/quidem/test/sql/within-distinct.iq /Users/runner/work/calcite/calcite/core/build/resources/test/sql/within-distinct.iq
819,825c819,964
< +----+-----+------+-------+------+----+-----+------+------+-------+
< | CX | CDX | CX_X | CX_XY | CX_Y | SX | SDX | SX_X | SX_Y | SDX_Y |
< +----+-----+------+-------+------+----+-----+------+------+-------+
< | 4 | 2 | 2 | 3 | 3 | 10 | 6 | 6 | 8 | 6 |
< +----+-----+------+-------+------+----+-----+------+------+-------+
< (1 row)
<
---
> java.sql.SQLException: Error while executing SQL "WITH t AS (SELECT * FROM (VALUES (2, 3), (2, 4), (2, 4), (4, 5)) AS t (x, y))
> SELECT COUNT(x) AS cx,
> COUNT(DISTINCT x) AS cdx,
> COUNT(x) WITHIN DISTINCT (x) AS cx_x,
> COUNT(x) WITHIN DISTINCT (x, y) AS cx_xy,
> COUNT(x) WITHIN DISTINCT (y) AS cx_y,
> SUM(x) AS sx,
> SUM(DISTINCT x) AS sdx,
> SUM(x) WITHIN DISTINCT (x) AS sx_x,
> SUM(x) WITHIN DISTINCT (y) AS sx_y,
> SUM(DISTINCT x) WITHIN DISTINCT (y) AS sdx_y
> FROM t": more than one distinct value in agg UNIQUE_VALUE
> at org.apache.calcite.avatica.Helper.createException(Helper.java:56)
> at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
> at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:164)
> at org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:228)
> at net.hydromatic.quidem.Quidem.checkResult(Quidem.java:299)
> at net.hydromatic.quidem.Quidem.access$2600(Quidem.java:57)
> at net.hydromatic.quidem.Quidem$ContextImpl.checkResult(Quidem.java:1636)
> at net.hydromatic.quidem.Quidem$CheckResultCommand.execute(Quidem.java:941)
> at net.hydromatic.quidem.Quidem$CompositeCommand.execute(Quidem.java:1437)
> at net.hydromatic.quidem.Quidem.execute(Quidem.java:190)
> at org.apache.calcite.test.QuidemTest.checkRun(QuidemTest.java:177)
> at org.apache.calcite.test.QuidemTest.test(QuidemTest.java:238)
> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
> at java.base/java.lang.reflect.Method.invoke(Method.java:580)
> at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
> at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
> at org.junit.jupiter.engine.extension.SameThreadTimeoutInvocation.proceed(SameThreadTimeoutInvocation.java:45)
> at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
> at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestTemplateMethod(TimeoutExtension.java:94)
> at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
> at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
> at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
> at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
> at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
> at org.junit.jupiter.engine.descriptor.TestM
|
The logs for this run have expired and are no longer available.
Loading