ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanilovsky Evgeny (Jira)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-13729) Calcite bug. "Not a boolean expression" on nested expression.
Date Wed, 18 Nov 2020 14:50:00 GMT
Stanilovsky Evgeny created IGNITE-13729:
-------------------------------------------

             Summary: Calcite bug. "Not a boolean expression" on nested expression.
                 Key: IGNITE-13729
                 URL: https://issues.apache.org/jira/browse/IGNITE-13729
             Project: Ignite
          Issue Type: Bug
          Components: sql
            Reporter: Stanilovsky Evgeny


Nested sql failure:
{noformat}
"SELECT name FROM Orders o WHERE NOT EXISTS ("SELECT 1 FROM Account a WHERE o.name = a.name)"
{noformat}

{noformat}
	Caused by: org.codehaus.commons.compiler.CompileException: Line 3, Column 23: Not a boolean
expression
		at org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:12211)
		at org.codehaus.janino.UnitCompiler.compileBoolean2(UnitCompiler.java:3994)
		at org.codehaus.janino.UnitCompiler.access$6300(UnitCompiler.java:215)
		at org.codehaus.janino.UnitCompiler$14$1.visitAmbiguousName(UnitCompiler.java:3942)
		at org.codehaus.janino.UnitCompiler$14$1.visitAmbiguousName(UnitCompiler.java:3939)
		at org.codehaus.janino.Java$AmbiguousName.accept(Java.java:4224)
		at org.codehaus.janino.UnitCompiler$14.visitLvalue(UnitCompiler.java:3939)
		at org.codehaus.janino.UnitCompiler$14.visitLvalue(UnitCompiler.java:3935)
		at org.codehaus.janino.Java$Lvalue.accept(Java.java:4148)
		at org.codehaus.janino.UnitCompiler.compileBoolean(UnitCompiler.java:3935)
		at org.codehaus.janino.UnitCompiler.compileBoolean2(UnitCompiler.java:4075)
		at org.codehaus.janino.UnitCompiler.access$6600(UnitCompiler.java:215)
		at org.codehaus.janino.UnitCompiler$14.visitBinaryOperation(UnitCompiler.java:3957)
		at org.codehaus.janino.UnitCompiler$14.visitBinaryOperation(UnitCompiler.java:3935)
		at org.codehaus.janino.Java$BinaryOperation.accept(Java.java:4864)
		at org.codehaus.janino.UnitCompiler.compileBoolean(UnitCompiler.java:3935)
		at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:2464)
		at org.codehaus.janino.UnitCompiler.access$1900(UnitCompiler.java:215)
		at org.codehaus.janino.UnitCompiler$6.visitIfStatement(UnitCompiler.java:1495)
		at org.codehaus.janino.UnitCompiler$6.visitIfStatement(UnitCompiler.java:1487)
		at org.codehaus.janino.Java$IfStatement.accept(Java.java:2950)
		at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:1487)
		at org.codehaus.janino.UnitCompiler.compileStatements(UnitCompiler.java:1567)
		at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:3388)
		at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1357)
		at org.codehaus.janino.UnitCompiler.compileDeclaredMethods(UnitCompiler.java:1330)
		at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:822)
		at org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:432)
		at org.codehaus.janino.UnitCompiler.access$400(UnitCompiler.java:215)
		at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:411)
		at org.codehaus.janino.UnitCompiler$2.visitPackageMemberClassDeclaration(UnitCompiler.java:406)
		at org.codehaus.janino.Java$PackageMemberClassDeclaration.accept(Java.java:1414)
		at org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:406)
		at org.codehaus.janino.UnitCompiler.compileUnit(UnitCompiler.java:378)
		at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:237)
		at org.codehaus.janino.SimpleCompiler.compileToClassLoader(SimpleCompiler.java:465)
		at org.codehaus.janino.ClassBodyEvaluator.compileToClass(ClassBodyEvaluator.java:313)
		at org.codehaus.janino.ClassBodyEvaluator.cook(ClassBodyEvaluator.java:235)
		at org.codehaus.janino.SimpleCompiler.cook(SimpleCompiler.java:207)
		at org.codehaus.commons.compiler.Cookable.cook(Cookable.java:50)
		at org.codehaus.janino.ClassBodyEvaluator.createInstance(ClassBodyEvaluator.java:347)
		at org.apache.ignite.internal.processors.query.calcite.util.Commons.compile(Commons.java:294)
		... 31 more
	Suppressed: org.apache.ignite.internal.processors.query.calcite.metadata.RemoteException:
Remote query execution
		... 14 more
	Caused by: java.lang.NullPointerException
		at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.push(ScanNode.java:115)
		at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.doPush(ScanNode.java:75)
		... 3 more
Caused by: java.lang.NullPointerException
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.push(ScanNode.java:115)
	at org.apache.ignite.internal.processors.query.calcite.exec.rel.ScanNode.doPush(ScanNode.java:75)
	... 3 more
{noformat}

appropriate plan:

{noformat}
IgniteProject(NAME=[$0]): rowcount = 253.375, cumulative cost = 20395.125, id = 961
  IgniteFilter(condition=[IS NULL($2)]): rowcount = 253.375, cumulative cost = 20140.75, id
= 960
    IgniteNestedLoopJoin(condition=[=($0, $1)], joinType=[left], variablesSet=[[]]): rowcount
= 1013.5, cumulative cost = 19126.25, id = 959
      IgniteExchange(distribution=[single]): rowcount = 1000.0, cumulative cost = 5000.0,
id = 955
        IgniteTableScan(table=[[PUBLIC, ORDERS]], requiredColunms=[{2}]): rowcount = 1000.0,
cumulative cost = 1000.0, id = 188
      IgniteReduceAggregate(rowType=[RecordType(JavaType(class java.lang.String) NAME, BOOLEAN
$f1)], group=[{0}], agg#0=[MIN($1)]): rowcount = 90.0, cumulative cost = 3971.25, id = 958
        IgniteExchange(distribution=[single]): rowcount = 90.0, cumulative cost = 3881.25,
id = 957
          IgniteMapAggregate(group=[{0}], agg#0=[MIN($1)]): rowcount = 90.0, cumulative cost
= 2801.25, id = 956
            IgniteTableScan(table=[[PUBLIC, ACCOUNT]], filters=[IS NOT NULL($t0)], projects=[[$t0,
true]], requiredColunms=[{2}]): rowcount = 900.0, cumulative cost = 2700.0, id = 211
{noformat}




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

Mime
View raw message