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

ASF GitHub Bot commented on DRILL-6491:
---------------------------------------

arina-ielchiieva commented on a change in pull request #1320: DRILL-6491: 
Prevent merge join for full outer join at planning stage
URL: https://github.com/apache/drill/pull/1320#discussion_r195702021
 
 

 ##########
 File path: 
exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java
 ##########
 @@ -255,6 +260,42 @@ public void testDrill4196() throws Exception {
       .go();
   }
 
+  @Test // DRILL-6491
+  public void testMergeIsNotSelectedForFullJoin() throws Exception {
+    setSessionOption(PlannerSettings.HASHJOIN.getOptionName(), true);
+
+    String query = "select * " +
+        " from (select employee_id from cp.`employee.json` order by 
employee_id) e1 " +
+        " full outer join (select employee_id from cp.`employee.json` order by 
employee_id) e2 " +
+        " on e1.employee_id = e2.employee_id " +
+        " limit 10";
+    try {
+      testPlanMatchingPatterns(query, new String[] {"HashJoin"}, new String[] 
{"MergeJoin"});
+    } finally {
+      test("ALTER SESSION RESET ALL");
 
 Review comment:
   Use ` resetSessionOption` method.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Prevent merge join for full outer join at planning stage
> --------------------------------------------------------
>
>                 Key: DRILL-6491
>                 URL: https://issues.apache.org/jira/browse/DRILL-6491
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.13.0
>            Reporter: Bohdan Kazydub
>            Assignee: Bohdan Kazydub
>            Priority: Minor
>             Fix For: 1.14.0
>
>
> Currently, planner may choose merge join for full outer join for the case 
> when another join types are enabled. When planner chooses merge join for full 
> outer join an error is thrown when {{MergeJoinPOP}} is being created:
> 2018-06-15 10:22:05,815 [24dc6cb4-a0d1-f6a5-0af9-c6138bc326d3:foreman] ERROR 
> o.a.drill.exec.work.foreman.Foreman - SYSTEM ERROR: IllegalArgumentException: 
> Full outer join not currently supported with Merge Join
> It may be observed using TPC-DS query 51.
> To fix this issue, the infinite cost should be set for merge rel node for the 
> case when join type is full outer join.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to