[jira] [Work logged] (HIVE-24233) except subquery throws nullpointer with cbo disabled

2020-11-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24233?focusedWorklogId=509114&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-509114
 ]

ASF GitHub Bot logged work on HIVE-24233:
-

Author: ASF GitHub Bot
Created on: 09/Nov/20 12:50
Start Date: 09/Nov/20 12:50
Worklog Time Spent: 10m 
  Work Description: pvary merged pull request #1555:
URL: https://github.com/apache/hive/pull/1555


   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


Issue Time Tracking
---

Worklog Id: (was: 509114)
Time Spent: 50m  (was: 40m)

> except subquery throws nullpointer with cbo disabled
> 
>
> Key: HIVE-24233
> URL: https://issues.apache.org/jira/browse/HIVE-24233
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Varga
>Assignee: Peter Varga
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Except and intersect was only implemented with Calcite in HIVE-12764. If cbo 
> is disabled it would just throw a nullpointer exception. We should at least 
> throw a SemanticException stating this is not supported.
> Repro:
> set hive.cbo.enable=false;
> create table test(id int);
> insert into table test values(1);
> select id from test except select id from test;



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24233) except subquery throws nullpointer with cbo disabled

2020-11-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24233?focusedWorklogId=509112&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-509112
 ]

ASF GitHub Bot logged work on HIVE-24233:
-

Author: ASF GitHub Bot
Created on: 09/Nov/20 12:48
Start Date: 09/Nov/20 12:48
Worklog Time Spent: 10m 
  Work Description: pvargacl commented on pull request #1555:
URL: https://github.com/apache/hive/pull/1555#issuecomment-723992095


   @pvary thanks for the review. Could you merge this?



This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


Issue Time Tracking
---

Worklog Id: (was: 509112)
Time Spent: 40m  (was: 0.5h)

> except subquery throws nullpointer with cbo disabled
> 
>
> Key: HIVE-24233
> URL: https://issues.apache.org/jira/browse/HIVE-24233
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Varga
>Assignee: Peter Varga
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> Except and intersect was only implemented with Calcite in HIVE-12764. If cbo 
> is disabled it would just throw a nullpointer exception. We should at least 
> throw a SemanticException stating this is not supported.
> Repro:
> set hive.cbo.enable=false;
> create table test(id int);
> insert into table test values(1);
> select id from test except select id from test;



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24233) except subquery throws nullpointer with cbo disabled

2020-11-03 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24233?focusedWorklogId=507102&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-507102
 ]

ASF GitHub Bot logged work on HIVE-24233:
-

Author: ASF GitHub Bot
Created on: 03/Nov/20 14:20
Start Date: 03/Nov/20 14:20
Worklog Time Spent: 10m 
  Work Description: pvargacl commented on a change in pull request #1555:
URL: https://github.com/apache/hive/pull/1555#discussion_r516689074



##
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##
@@ -11628,6 +11628,11 @@ private void setupStats(TableScanDesc tsDesc, 
QBParseInfo qbp, Table tab, String
   }
 
   private Operator genPlan(QB parent, QBExpr qbexpr) throws SemanticException {
+if (qbexpr.getOpcode() == QBExpr.Opcode.EXCEPT || qbexpr.getOpcode() == 
QBExpr.Opcode.EXCEPTALL
+|| qbexpr.getOpcode() == QBExpr.Opcode.INTERSECT || qbexpr.getOpcode() 
== QBExpr.Opcode.INTERSECTALL) {
+  throw new SemanticException(
+  "Except and intersect operations are only supported with Cost Based 
Optimizations enabled. Turn on hive.cbo.enable");

Review comment:
   Fixed

##
File path: ql/src/test/queries/clientnegative/except_cbooff.q
##
@@ -0,0 +1,5 @@
+set hive.cbo.enable=false;

Review comment:
   Yes there are, they were added when the original feature was developed.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


Issue Time Tracking
---

Worklog Id: (was: 507102)
Time Spent: 0.5h  (was: 20m)

> except subquery throws nullpointer with cbo disabled
> 
>
> Key: HIVE-24233
> URL: https://issues.apache.org/jira/browse/HIVE-24233
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Varga
>Assignee: Peter Varga
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Except and intersect was only implemented with Calcite in HIVE-12764. If cbo 
> is disabled it would just throw a nullpointer exception. We should at least 
> throw a SemanticException stating this is not supported.
> Repro:
> set hive.cbo.enable=false;
> create table test(id int);
> insert into table test values(1);
> select id from test except select id from test;



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24233) except subquery throws nullpointer with cbo disabled

2020-11-03 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24233?focusedWorklogId=507076&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-507076
 ]

ASF GitHub Bot logged work on HIVE-24233:
-

Author: ASF GitHub Bot
Created on: 03/Nov/20 14:17
Start Date: 03/Nov/20 14:17
Worklog Time Spent: 10m 
  Work Description: pvary commented on a change in pull request #1555:
URL: https://github.com/apache/hive/pull/1555#discussion_r516640708



##
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##
@@ -11628,6 +11628,11 @@ private void setupStats(TableScanDesc tsDesc, 
QBParseInfo qbp, Table tab, String
   }
 
   private Operator genPlan(QB parent, QBExpr qbexpr) throws SemanticException {
+if (qbexpr.getOpcode() == QBExpr.Opcode.EXCEPT || qbexpr.getOpcode() == 
QBExpr.Opcode.EXCEPTALL
+|| qbexpr.getOpcode() == QBExpr.Opcode.INTERSECT || qbexpr.getOpcode() 
== QBExpr.Opcode.INTERSECTALL) {
+  throw new SemanticException(
+  "Except and intersect operations are only supported with Cost Based 
Optimizations enabled. Turn on hive.cbo.enable");

Review comment:
   Could we say instead or something like it?
   ```
   "EXCEPT and INTERSECT operations are only supported with Cost Based 
Optimizations enabled. Please set 'hive.cbo.enable' to true"
   ```

##
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
##
@@ -11628,6 +11628,11 @@ private void setupStats(TableScanDesc tsDesc, 
QBParseInfo qbp, Table tab, String
   }
 
   private Operator genPlan(QB parent, QBExpr qbexpr) throws SemanticException {
+if (qbexpr.getOpcode() == QBExpr.Opcode.EXCEPT || qbexpr.getOpcode() == 
QBExpr.Opcode.EXCEPTALL
+|| qbexpr.getOpcode() == QBExpr.Opcode.INTERSECT || qbexpr.getOpcode() 
== QBExpr.Opcode.INTERSECTALL) {
+  throw new SemanticException(
+  "Except and intersect operations are only supported with Cost Based 
Optimizations enabled. Turn on hive.cbo.enable");

Review comment:
   Could we say instead or something like this?
   ```
   "EXCEPT and INTERSECT operations are only supported with Cost Based 
Optimizations enabled. Please set 'hive.cbo.enable' to true"
   ```

##
File path: ql/src/test/queries/clientnegative/except_cbooff.q
##
@@ -0,0 +1,5 @@
+set hive.cbo.enable=false;

Review comment:
   Do we have positive tests?





This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


Issue Time Tracking
---

Worklog Id: (was: 507076)
Time Spent: 20m  (was: 10m)

> except subquery throws nullpointer with cbo disabled
> 
>
> Key: HIVE-24233
> URL: https://issues.apache.org/jira/browse/HIVE-24233
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Varga
>Assignee: Peter Varga
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Except and intersect was only implemented with Calcite in HIVE-12764. If cbo 
> is disabled it would just throw a nullpointer exception. We should at least 
> throw a SemanticException stating this is not supported.
> Repro:
> set hive.cbo.enable=false;
> create table test(id int);
> insert into table test values(1);
> select id from test except select id from test;



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (HIVE-24233) except subquery throws nullpointer with cbo disabled

2020-10-06 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-24233?focusedWorklogId=495752&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-495752
 ]

ASF GitHub Bot logged work on HIVE-24233:
-

Author: ASF GitHub Bot
Created on: 06/Oct/20 07:17
Start Date: 06/Oct/20 07:17
Worklog Time Spent: 10m 
  Work Description: pvargacl opened a new pull request #1555:
URL: https://github.com/apache/hive/pull/1555


   
   ### What changes were proposed in this pull request?
   Throw semanticException for except when cbo is disabled
   
   ### Why are the changes needed?
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   negative q test
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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


Issue Time Tracking
---

Worklog Id: (was: 495752)
Remaining Estimate: 0h
Time Spent: 10m

> except subquery throws nullpointer with cbo disabled
> 
>
> Key: HIVE-24233
> URL: https://issues.apache.org/jira/browse/HIVE-24233
> Project: Hive
>  Issue Type: Bug
>Reporter: Peter Varga
>Assignee: Peter Varga
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Except and intersect was only implemented with Calcite in HIVE-12764. If cbo 
> is disabled it would just throw a nullpointer exception. We should at least 
> throw a SemanticException stating this is not supported.
> Repro:
> set hive.cbo.enable=false;
> create table test(id int);
> insert into table test values(1);
> select id from test except select id from test;



--
This message was sent by Atlassian Jira
(v8.3.4#803005)