unload with union query fails with ERROR[4066]
Bug #1398981 reported by
Julie Thai
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Committed
|
Medium
|
khaled Bouaziz |
Bug Description
On cluster with build 20141126_0830:
SQL>unload with purgedata from target
into '/bulkload/
select ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, ps_comment
from g_tpch2x.partsupp where ps_partkey < 90000
UNION
select ps_partkey, ps_suppkey, ps_availqty, ps_supplycost, ps_comment
from g_tpch2x.partsupp where ps_partkey between 180000 and 200000;
*** ERROR[4066] The operands of a UNION must be of equal degree. [2014-12-03 12:26:00]
Changed in trafodion: | |
status: | New → Fix Committed |
To post a comment you must log in.
the display tool showed that the unload node is a child of the union in this case and the second child is a select statement
scalar_ aggr
root
|
\
union
/ \
root root
| |
unload scan
what we want is a plan where union is a child of the unload node in this case.
the issue seems to be in the parser production rules for t he unload command. after changing t he parser the issue does not sem to happen any more and the plan we get now is like this
root
|
unload
|
group by
|
union
/ \
scan scan
the change in the parser also allowed us to use query_expression with no additional parser conflicts