You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jinfeng Ni (JIRA)" <ji...@apache.org> on 2017/08/04 22:56:00 UTC

[jira] [Commented] (DRILL-5185) Union all not passing type info when the output contains 0 rows

    [ https://issues.apache.org/jira/browse/DRILL-5185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16115068#comment-16115068 ] 

Jinfeng Ni commented on DRILL-5185:
-----------------------------------

Run against a patch for DRILL-5466. The query, which originally failed, is completed successfully.

{code}
0: jdbc:drill:zk=local> select t1.l_partkey, t2.o_orderdate from (
. . . . . . . . . . . >   select l_orderkey, l_partkey, l_comment from cp.`tpch/lineitem.parquet` where l_quantity is null
. . . . . . . . . . . >   union
. . . . . . . . . . . >   select l_orderkey, l_partkey, l_comment from cp.`tpch/lineitem.parquet` where l_quantity is null
. . . . . . . . . . . >   ) as t1,
. . . . . . . . . . . >   cp.`tpch/orders.parquet` as t2
. . . . . . . . . . . > where t1.l_comment = t2.o_comment;
+------------+--------------+
| l_partkey  | o_orderdate  |
+------------+--------------+
+------------+--------------+
No rows selected (1.099 seconds)
{code}

> Union all not passing type info when the output contains 0 rows
> ---------------------------------------------------------------
>
>                 Key: DRILL-5185
>                 URL: https://issues.apache.org/jira/browse/DRILL-5185
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators, Query Planning & Optimization
>    Affects Versions: 1.10.0
>            Reporter: Rahul Challapalli
>            Assignee: Jinfeng Ni
>
> Version : 1.10.0
> git.commit.id.abbrev=4d4e0c2
> The below query fails without an explicit cast
> {code}
> 0: jdbc:drill:zk=10.10.100.190:5181> select t1.l_partkey, t2.o_orderdate from (
> . . . . . . . . . . . . . . . . . .> select l_orderkey, l_partkey, l_comment from cp.`tpch/lineitem.parquet` where l_quantity is null
> . . . . . . . . . . . . . . . . . .> union 
> . . . . . . . . . . . . . . . . . .> select l_orderkey, l_partkey, l_comment from cp.`tpch/lineitem.parquet` where l_quantity is null
> . . . . . . . . . . . . . . . . . .> ) as t1,
> . . . . . . . . . . . . . . . . . .> cp.`tpch/orders.parquet` as t2
> . . . . . . . . . . . . . . . . . .> where t1.l_comment = t2.o_comment;
> Error: SYSTEM ERROR: DrillRuntimeException: Join only supports implicit casts between 1. Numeric data
>  2. Varchar, Varbinary data 3. Date, Timestamp data Left type: VARCHAR, Right type: INT. Add explicit casts to avoid this error
> Fragment 0:0
> [Error Id: e09bb8ee-cb1c-48bc-9dce-42ace2d4b80b on qa-node190.qa.lab:31010] (state=,code=0)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)