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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to