You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "kasakrisz (via GitHub)" <gi...@apache.org> on 2023/07/26 09:25:09 UTC

[GitHub] [hive] kasakrisz commented on a diff in pull request #4511: HIVE-27480: OFFSET without ORDER BY generates wrong results

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


##########
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:
##########
@@ -7015,6 +7022,12 @@ public static String checkBucketing(Configuration conf) {
       return isAllowed(conf, ConfVars.HIVE_STRICT_CHECKS_BUCKETING) ? null : NO_BUCKETING_MSG;
     }
 
+    public static void checkOffsetWithoutOrderBy(Configuration conf) throws SemanticException {
+      if (!isAllowed(conf, ConfVars.HIVE_STRICT_CHECKS_OFFSET_NO_ORDERBY)) {
+        throw new SemanticException(NO_OFFSET_WITHOUT_ORDERBY_MSG);

Review Comment:
   Could you please add a warning when it is allowed to let the user know that offset without order by gives non-deterministic results.
   Here is an example how to write to console. AFAIK this should be seen in beeline:
   https://github.com/apache/hive/blob/25826cc9e0dfdc9de2edf19c2ab9962ba20267d8/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java#L14370C11-L14370C44



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org