[ 
https://issues.apache.org/jira/browse/DRILL-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jinfeng Ni updated DRILL-2630:
------------------------------
    Attachment: complex_1.json

Attach the sample JSON file used in the query.



> Merge join over inputs with complex type hit run-time code compiler error
> -------------------------------------------------------------------------
>
>                 Key: DRILL-2630
>                 URL: https://issues.apache.org/jira/browse/DRILL-2630
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators
>            Reporter: Jinfeng Ni
>            Assignee: Chris Westin
>         Attachments: complex_1.json
>
>
> Hit run-time code complier error, if we have a merge join whose inputs 
> contain complex type.
> {code}
> select * from sys.version;
> +------------+----------------+-------------+-------------+------------+
> | commit_id  | commit_message | commit_time | build_email | build_time |
> +------------+----------------+-------------+-------------+------------+
> | 0fbcddba14405ec94d51b0ba3512925168efb433 | DRILL-2375: implement reader 
> reset mechanism and reset reader before accessing it during projection | 
> 30.03.2015 @ 10:27:02 PDT | j...@maprtech.com | 30.03.2015 @ 16:50:01 PDT |
> +------------+----------------+-------------+-------------+------------+
> {code}
> {code}
> alter session set `planner.enable_hashjoin` = false;
> {code}
> {code}
> select a.id, b.oooi.oa.oab.oabc oabc, b.ooof.oa.oab oab from 
> dfs.`/tmp/complex_1.json` a left outer join cp.`/tmp/complex_1.json` b on 
> a.id=b.id order by a.id;
> {code}
> {code}
> +------------+------------+------------+
> |     id     |    oabc    |    oab     |
> +------------+------------+------------+
> Query failed: Query stopped., Line 49, Column 32: No applicable 
> constructor/method found for actual parameters "int, int, 
> org.apache.drill.exec.vector.complex.MapVector"; candidates are: "public void 
> org.apache.drill.exec.vector.NullableTinyIntVector.copyFromSafe(int, int, 
> org.apache.drill.exec.vector.NullableTinyIntVector)", "public void 
> org.apache.drill.exec.vector.NullableTinyIntVector.copyFromSafe(int, int, 
> org.apache.drill.exec.vector.TinyIntVector)" [ 
> e5905a74-98d0-46d4-8090-bcf0cc710e8a on 10.250.0.8:31010 ]
> {code}
> If I switch to hash join, then, the query works fine. Therefore, looks like 
> Merge Join operator has some bug in handling complex type.
> {code}
> alter session set `planner.enable_hashjoin` = true;
> +------------+------------+
> |     ok     |  summary   |
> +------------+------------+
> | true       | planner.enable_hashjoin updated. |
> +------------+------------+
> 1 row selected (0.058 seconds)
> 0: jdbc:drill:zk=local> select a.id, b.oooi.oa.oab.oabc oabc, b.ooof.oa.oab 
> oab from dfs.`/tmp/complex_1.json` a left outer join 
> dfs.`/tmp/complex_1.json` b on a.id=b.id order by a.id;
> +------------+------------+------------+
> |     id     |    oabc    |    oab     |
> +------------+------------+------------+
> | 1          | 1          | {"oabc":1.5678} |
> | 2          | 2          | {"oabc":2.5678} |
> +------------+------------+------------+
> 2 rows selected (0.73 seconds)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to