kasakrisz commented on code in PR #4511:
URL: https://github.com/apache/hive/pull/4511#discussion_r1317111691


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -11258,38 +11259,47 @@ private Operator genPostGroupByBodyPlan(Operator 
curr, String dest, QB qb,
 
     if (qbp.getOrderByForClause(dest) != null) {
       genReduceSink = true;
+      numReducers = 1;
       hasOrderBy = true;
     }
 
+    if (offset > 0 && !hasOrderBy) {
+      HiveConf.StrictChecks.checkOffsetWithoutOrderBy(conf);
+
+      assert limit != null : "OFFSET is always paired with LIMIT";

Review Comment:
   It can be done in a separate patch if necessary.
   



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

To unsubscribe, e-mail: [email protected]

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