Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Cannot plan query that is UNION ALL applied to VALUES. For example, in JdbcTest:
@Test public void testUnionAllValues() { CalciteAssert.hr() .query("select x, y from (values (1, 2)) as t(x, y)\n" + "union all\n" + "select a + b, a - b from (values (3, 4), (5, 6)) as u(a, b)") .returnsUnordered(); }
gives
java.sql.SQLException: Error while executing SQL "select x, y from (values (1, 2)) as t(x, y) union all select a + b, a - b from (values (3, 4), (5, 6)) as u(a, b)": Node [rel#26:Subset#4.ENUMERABLE.[]] could not be implemented; planner state: Root: rel#26:Subset#4.ENUMERABLE.[] Original rel: LogicalUnion(subset=[rel#26:Subset#4.ENUMERABLE.[]], all=[true]): rowcount = 3.0, cumulative cost = {3.0 rows, 3.0 cpu, 0.0 io}, id = 21 LogicalProject(subset=[rel#17:Subset#1.NONE.[]], X=[$0], Y=[$1]): rowcount = 1.0, cumulative cost = {1.0 rows, 2.0 cpu, 0.0 io}, id = 16 LogicalValues(subset=[rel#15:Subset#0.NONE.[]], tuples=[[{ 1, 2 }]]): rowcount = 1.0, cumulative cost = {1.0 rows, 1.0 cpu, 0.0 io}, id = 1 LogicalProject(subset=[rel#20:Subset#3.NONE.[0]], EXPR$0=[+($0, $1)], EXPR$1=[-($0, $1)]): rowcount = 2.0, cumulative cost = {2.0 rows, 4.0 cpu, 0.0 io}, id = 19 LogicalValues(subset=[rel#18:Subset#2.NONE.[]], tuples=[[{ 3, 4 }, { 5, 6 }]]): rowcount = 2.0, cumulative cost = {2.0 rows, 1.0 cpu, 0.0 io}, id = 4
Attachments
Attachments
Issue Links
- relates to
-
CALCITE-2593 Sometimes fails to plan when a RelNode transform multiple collations to single collation
- Closed