You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/10/12 22:17:00 UTC
[jira] [Created] (CALCITE-2010) Cannot plan query that is UNION ALL
applied to VALUES
Julian Hyde created CALCITE-2010:
------------------------------------
Summary: Cannot plan query that is UNION ALL applied to VALUES
Key: CALCITE-2010
URL: https://issues.apache.org/jira/browse/CALCITE-2010
Project: Calcite
Issue Type: Bug
Reporter: Julian Hyde
Assignee: Julian Hyde
Cannot plan query that is UNION ALL applied to VALUES. For example, in JdbcTest:
{code}
@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();
}
{code}
gives
{noformat}
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
{noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)