[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-19 Thread ASF GitHub Bot (JIRA)


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

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

arina-ielchiieva commented on issue #1320: DRILL-6491: Prevent merge join for 
full outer join at planning stage
URL: https://github.com/apache/drill/pull/1320#issuecomment-398294814
 
 
   Looks good, @vvysotskyi?


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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

vvysotskyi 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_r195711723
 
 

 ##
 File path: 
exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java
 ##
 @@ -255,6 +260,41 @@ public void testDrill4196() throws Exception {
   .go();
   }
 
+  @Test // DRILL-6491
+  public void testMergeIsNotSelectedForFullJoin() throws Exception {
+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 {
+  setSessionOption(PlannerSettings.HASHJOIN.getOptionName(), true);
+  testPlanMatchingPatterns(query, new String[] {"HashJoin"}, new String[] 
{"MergeJoin"});
+} finally {
+  resetSessionOption(PlannerSettings.HASHJOIN.getOptionName());
 
 Review comment:
   This option is set in `@BeforeClass` method, but here you are resetting it 
to the default value. It may cause failures for other tests in the class which 
depends on the value of this option.


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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

vvysotskyi 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_r195712008
 
 

 ##
 File path: 
exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/join/TestMergeJoinAdvanced.java
 ##
 @@ -255,6 +260,41 @@ public void testDrill4196() throws Exception {
   .go();
   }
 
+  @Test // DRILL-6491
+  public void testMergeIsNotSelectedForFullJoin() throws Exception {
+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 {
+  setSessionOption(PlannerSettings.HASHJOIN.getOptionName(), true);
+  testPlanMatchingPatterns(query, new String[] {"HashJoin"}, new String[] 
{"MergeJoin"});
+} finally {
+  resetSessionOption(PlannerSettings.HASHJOIN.getOptionName());
+}
+  }
+
+  @Test // DRILL-6491
+  public void testFullJoinIsNotSupported() throws Exception {
+thrown.expect(UserRemoteException.class);
+thrown.expectMessage(CoreMatchers.containsString("SYSTEM ERROR: 
CannotPlanException"));
+
+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 {
+  setSessionOption(PlannerSettings.HASHJOIN.getOptionName(), false);
 
 Review comment:
   The same as above.


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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_r195708155
 
 

 ##
 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");
+}
+  }
+
+  @Test // DRILL-6491
+  public void testFullJoinIsNotSupported() throws Exception {
+thrown.expect(UserRemoteException.class);
+thrown.expectMessage(CoreMatchers.containsString("SYSTEM ERROR: 
CannotPlanException"));
 
 Review comment:
   I meant right before executing the query.


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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

KazydubB 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_r195707074
 
 

 ##
 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");
+}
+  }
+
+  @Test // DRILL-6491
+  public void testFullJoinIsNotSupported() throws Exception {
+thrown.expect(UserRemoteException.class);
+thrown.expectMessage(CoreMatchers.containsString("SYSTEM ERROR: 
CannotPlanException"));
 
 Review comment:
   Done.


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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

KazydubB 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_r195706909
 
 

 ##
 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");
+}
+  }
+
+  @Test // DRILL-6491
+  public void testFullJoinIsNotSupported() throws Exception {
+thrown.expect(UserRemoteException.class);
+thrown.expectMessage(CoreMatchers.containsString("SYSTEM ERROR: 
CannotPlanException"));
+
+setSessionOption(PlannerSettings.HASHJOIN.getOptionName(), false);
+setSessionOption(PlannerSettings.NESTEDLOOPJOIN.getOptionName(), false);
+
+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 {
+  test(query);
+} finally {
+  test("ALTER SESSION RESET ALL");
 
 Review comment:
   Yes, we still need it as the Exception is thrown for real (though, expected).


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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_r195701291
 
 

 ##
 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");
+}
+  }
+
+  @Test // DRILL-6491
+  public void testFullJoinIsNotSupported() throws Exception {
+thrown.expect(UserRemoteException.class);
+thrown.expectMessage(CoreMatchers.containsString("SYSTEM ERROR: 
CannotPlanException"));
+
+setSessionOption(PlannerSettings.HASHJOIN.getOptionName(), false);
+setSessionOption(PlannerSettings.NESTEDLOOPJOIN.getOptionName(), false);
+
+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 {
+  test(query);
+} finally {
+  test("ALTER SESSION RESET ALL");
 
 Review comment:
   Do we need finally if we have thrown?


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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_r195702420
 
 

 ##
 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);
 
 Review comment:
   Set options in try so they will be reset in finally.


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/DRILL-6491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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

KazydubB 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_r195701766
 
 

 ##
 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:
   What if default values for the (explicitly) set options are changed in the 
future?


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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_r195700497
 
 

 ##
 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");
+}
+  }
+
+  @Test // DRILL-6491
+  public void testFullJoinIsNotSupported() throws Exception {
+thrown.expect(UserRemoteException.class);
+thrown.expectMessage(CoreMatchers.containsString("SYSTEM ERROR: 
CannotPlanException"));
 
 Review comment:
   Declare thrown right before the query.


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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_r195700979
 
 

 ##
 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");
+}
+  }
+
+  @Test // DRILL-6491
+  public void testFullJoinIsNotSupported() throws Exception {
+thrown.expect(UserRemoteException.class);
+thrown.expectMessage(CoreMatchers.containsString("SYSTEM ERROR: 
CannotPlanException"));
+
+setSessionOption(PlannerSettings.HASHJOIN.getOptionName(), false);
+setSessionOption(PlannerSettings.NESTEDLOOPJOIN.getOptionName(), false);
+
+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 {
+  test(query);
+} finally {
+  test("ALTER SESSION RESET ALL");
 
 Review comment:
   Do not reset all sessions options.


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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

KazydubB commented on issue #1320: DRILL-6491: Prevent merge join for full 
outer join at planning stage
URL: https://github.com/apache/drill/pull/1320#issuecomment-397587486
 
 
   Done.


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-15 Thread ASF GitHub Bot (JIRA)


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

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_r195700422
 
 

 ##
 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:
   Reset only options, you have set.


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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-13 Thread ASF GitHub Bot (JIRA)


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

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

vvysotskyi commented on issue #1320: DRILL-6491: Prevent merge join for full 
outer join at planning stage
URL: https://github.com/apache/drill/pull/1320#issuecomment-396879039
 
 
   Could you please add unit tests to check that plan with full outer merge 
join will be omitted for the case when it was chosen before your changes? 
   
   Also, it would be good to add more detailed description of the problem into 
the Jira.


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.
> 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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-13 Thread ASF GitHub Bot (JIRA)


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

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

vvysotskyi commented on issue #1320: DRILL-6491: Prevent merge join for full 
outer join at planning stage
URL: https://github.com/apache/drill/pull/1320#issuecomment-396879039
 
 
   Could you please add unit tests to check that plan with full outer merge 
join will be omitted for the case when it was chosen before your changes? 
   
   Also, it would be fine to add more detailed description of the problem into 
the Jira.


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.
> 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)


[jira] [Commented] (DRILL-6491) Prevent merge join for full outer join at planning stage

2018-06-13 Thread ASF GitHub Bot (JIRA)


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

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

KazydubB opened a new pull request #1320: DRILL-6491: Prevent merge join for 
full outer join at planning stage
URL: https://github.com/apache/drill/pull/1320
 
 
   


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.
> 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)