Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
Description
Hi Julian,
If I put 'or' in a join condition, then optiq will throw CanNotPlanException. If I change "or" to "and", everything is fine. (The query itself does not have any real meaning).
"select d.\"deptno\" \n"
+ "from \"hr\".\"emps\" as e\n"
+ "join \"hr\".\"depts\" as d\n"
+ " on e.\"deptno\" = d.\"deptno\" or e.\"empid\" = d.\"deptno\"\n"
java.sql.SQLException: while executing SQL: select d."deptno"
from "hr"."emps" as e
join "hr"."depts" as d
on e."deptno" = d."deptno" or e."empid" = d."deptno"
at net.hydromatic.avatica.Helper.createException(Helper.java:40)
at net.hydromatic.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:80)
at net.hydromatic.optiq.test.JdbcTest.testReadme(JdbcTest.java:318)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:202)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.eigenbase.relopt.RelOptPlanner$CannotPlanException: Node [rel(#22 | FLINK-22):Subset([#5|https://github.com/JulianHyde/optiq/issues/5] | FLINK-5).ENUMERABLE.[]] could not be implemented; planner state:
---------------- Imported from GitHub ----------------
Url: https://github.com/julianhyde/optiq/issues/212
Created by: jinfengni
Labels:
Created at: Thu Mar 27 02:23:22 CET 2014
State: open
Attachments
Issue Links
- duplicates
-
CALCITE-451 Implement theta join, inner and outer, in enumerable convention
- Closed
- requires
-
CALCITE-451 Implement theta join, inner and outer, in enumerable convention
- Closed