deniskuzZ commented on code in PR #6510:
URL: https://github.com/apache/hive/pull/6510#discussion_r3332035618


##########
ql/src/java/org/apache/hadoop/hive/ql/optimizer/SimpleFetchOptimizer.java:
##########
@@ -144,8 +145,15 @@ private FetchTask optimize(ParseContext pctx, String 
alias, TableScanOperator so
     if (fetch != null && checkThreshold(fetch, limit, pctx)) {
       FetchWork fetchWork = fetch.convertToWork();
       FetchTask fetchTask = (FetchTask) TaskFactory.get(fetchWork);
-      fetchTask.setCachingEnabled(HiveConf.getBoolVar(pctx.getConf(),
-              HiveConf.ConfVars.HIVE_FETCH_TASK_CACHING));
+      boolean cachingEnabled = HiveConf.getBoolVar(pctx.getConf(),
+          HiveConf.ConfVars.HIVE_FETCH_TASK_CACHING);
+      if (cachingEnabled && !AcidUtils.isTransactionalTable(fetch.table)) {
+        LOG.debug("Fetch task caching is enabled but table {} is not 
transactional. " +
+            "Caching is only supported for ACID tables to prevent Cleaner race 
conditions. Disabling.",

Review Comment:
   what are those `Cleaner race conditions`?



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