You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/10/21 06:22:36 UTC

[GitHub] [hive] abstractdog commented on a change in pull request #2693: HIVE-25582: Empty result when using offset limit with MR

abstractdog commented on a change in pull request #2693:
URL: https://github.com/apache/hive/pull/2693#discussion_r733352864



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java
##########
@@ -69,8 +69,8 @@ protected void initializeOp(Configuration hconf) throws HiveException {
     this.runtimeCache = ObjectCacheFactory.getCache(getConfiguration(), queryId, false, true);
 
     // this can happen in HS2 while doing local fetch optimization, where LimitOperator is used
-    if (runtimeCache == null) {
-      if (!HiveConf.isLoadHiveServer2Config()) {
+    if (runtimeCache == null || !HiveConf.getVar(hconf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("tez")) {

Review comment:
       @dengzhhu653: I'm trying to understand how the original implementation led to empty result in MR, and why is the !tez condition helped...this will force the code to hit below codepath in MR, where we throw an exception if runtimeCache is null outside of HS2 or instantiate runtimeCache (in HS2)
   
   without this patch, what happened in case of MR? I guess as the patch forced to hit this condition:
   ```
   runtimeCache == null || !HiveConf.getVar(hconf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE).equals("tez")
   ```
   even if the runtimeCache is not null, so runtimeCache should not have been null originally...if so, what's the value of the code inside condition
   




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