Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.8.0
-
None
Description
Hit run-time code complier error, if we have a merge join whose inputs contain complex type.
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 | jni@maprtech.com | 30.03.2015 @ 16:50:01 PDT | +------------+----------------+-------------+-------------+------------+
alter session set `planner.enable_hashjoin` = false;
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;
+------------+------------+------------+ | 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 ]
If I switch to hash join, then, the query works fine. Therefore, looks like Merge Join operator has some bug in handling complex type.
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)