You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2021/03/02 05:52:00 UTC

[jira] [Updated] (CALCITE-4516) ...had non-nullable type BOOLEAN, and it was optimized to..that has nullable type BOOLEAN

     [ https://issues.apache.org/jira/browse/CALCITE-4516?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde updated CALCITE-4516:
---------------------------------
        Parent:     (was: CALCITE-4446)
    Issue Type: Bug  (was: Sub-task)

> ...had non-nullable type BOOLEAN, and it was optimized to..that has nullable type BOOLEAN
> -----------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4516
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4516
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Vladimir Sitnikov
>            Priority: Blocker
>
> {noformat}
> COALESCE(SEARCH(CASE(true, -1076415185, null:INTEGER), Sarg[(0..+∞); NULL AS TRUE]), AND(IS TRUE(?0.notNullBool0), =(?0.bool0, ?0.bool0), SEARCH(0, Sarg[4])))
> coalesce(rexBuilder.makeCall(SqlStdOperatorTable.SEARCH, case_(trueLiteral, literal(-1076415185), nullInt), literal(Sarg[(0..+∞); NULL AS TRUE])), and(isTrue(vBoolNotNull(0)), eq(vBool(0), vBool(0)), rexBuilder.makeCall(SqlStdOperatorTable.SEARCH, literal(0), literal(Sarg[4])))) had non-nullable type BOOLEAN, and it was optimized to >(CASE(true, -1076415185, null:INTEGER), 0)
> gt(case_(trueLiteral, literal(-1076415185), nullInt), literal(0)) that has nullable type BOOLEAN
> org.opentest4j.AssertionFailedError: COALESCE(SEARCH(CASE(true, -1076415185, null:INTEGER), Sarg[(0..+∞); NULL AS TRUE]), AND(IS TRUE(?0.notNullBool0), =(?0.bool0, ?0.bool0), SEARCH(0, Sarg[4])))
> coalesce(rexBuilder.makeCall(SqlStdOperatorTable.SEARCH, case_(trueLiteral, literal(-1076415185), nullInt), literal(Sarg[(0..+∞); NULL AS TRUE])), and(isTrue(vBoolNotNull(0)), eq(vBool(0), vBool(0)), rexBuilder.makeCall(SqlStdOperatorTable.SEARCH, literal(0), literal(Sarg[4])))) had non-nullable type BOOLEAN, and it was optimized to >(CASE(true, -1076415185, null:INTEGER), 0)
> gt(case_(trueLiteral, literal(-1076415185), nullInt), literal(0)) that has nullable type BOOLEAN
> 	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39)
> 	at org.junit.jupiter.api.Assertions.fail(Assertions.java:109)
> 	at org.apache.calcite.test.fuzzer.RexProgramFuzzyTest.checkUnknownAs(RexProgramFuzzyTest.java:306)
> 	at org.apache.calcite.test.fuzzer.RexProgramFuzzyTest.checkUnknownAsAndShrink(RexProgramFuzzyTest.java:173)
> 	at org.apache.calcite.test.fuzzer.RexProgramFuzzyTest.checkUnknownAs(RexProgramFuzzyTest.java:167)
> 	at org.apache.calcite.test.fuzzer.RexProgramFuzzyTest.generateRexAndCheckTrueFalse(RexProgramFuzzyTest.java:457)
> 	at org.apache.calcite.test.fuzzer.RexProgramFuzzyTest.runRexFuzzer(RexProgramFuzzyTest.java:389)
> 	at org.apache.calcite.test.fuzzer.RexProgramFuzzyTest.testFuzzy(RexProgramFuzzyTest.java:360)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
> 	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:675)
> 	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
> 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:125)
> 	at org.junit.jupiter.engine.extension.TimeoutInvocation.proceed(TimeoutInvocation.java:46)
> 	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:139)
> 	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:131)
> 	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:81)
> 	at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
> 	at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
> 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:104)
> 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:62)
> 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:43)
> 	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:35)
> 	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
> 	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
> 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:202)
> 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:198)
> 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
> 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
> 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
> 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
> 	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
> 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
> 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
> 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
> 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
> 	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:171)
> 	at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:189)
> 	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
> 	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
> 	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
> 	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
> 	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
> 	Suppressed: org.apache.calcite.test.fuzzer.RexProgramFuzzyTest$1: seed -498682129549544641
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)