hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-22536) Improve return path enabling/disabling
Date Mon, 16 Dec 2019 16:25:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-22536?focusedWorklogId=360350&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-360350
]

ASF GitHub Bot logged work on HIVE-22536:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Dec/19 16:24
            Start Date: 16/Dec/19 16:24
    Worklog Time Spent: 10m 
      Work Description: miklosgergely commented on pull request #866: HIVE-22536 Improve return
path enabling/disabling
URL: https://github.com/apache/hive/pull/866#discussion_r358329853
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/parse/ReturnPathManager.java
 ##########
 @@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.hive.ql.parse;
+
+import org.apache.hadoop.hive.conf.HiveConf;
+
+/**
+ * This is a temporary class for the time while we are in transition to use return path only.
+ * It's purpose is to decide if Hive should use return path.
+ */
+public final class ReturnPathManager {
+  private ReturnPathManager() {
+    throw new UnsupportedOperationException("ReturnPathManager should not be instantiated");
+  }
+
+  private static ThreadLocal<Boolean> useReturnPath = new ThreadLocal<>();
+
+  public static void init(HiveConf conf, ASTNode root) {
+    boolean use = shouldUseReturnPath(conf, root);
+    useReturnPath.set(use);
+  }
+
+  public static boolean shouldUse() {
+    return useReturnPath.get();
+  }
+
+  private static boolean shouldUseReturnPath(HiveConf conf, ASTNode root) {
 
 Review comment:
   Ok, so I know now how to remove those usages from HiveTableScan creation, but what about
the rest of the usages? CalcitePlannerAction.applyPostJoinOrderingTransform and CalcitePlannerAction.genTableLogicalPlan
also relies on the value, can those be replaced with some hard coded value as well?
 
----------------------------------------------------------------
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:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 360350)
    Time Spent: 2h 40m  (was: 2.5h)

> Improve return path enabling/disabling
> --------------------------------------
>
>                 Key: HIVE-22536
>                 URL: https://issues.apache.org/jira/browse/HIVE-22536
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Hive
>            Reporter: Miklos Gergely
>            Assignee: Miklos Gergely
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>         Attachments: HIVE-22536.01.patch, HIVE-22536.02.patch, HIVE-22536.03.patch
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Instead of having a boolean for hive.cbo.returnpath.hiveop it should be on/off/supported.
In case of "supported" it should be used for a subset of commands which are already verified
to be able to work with return path. This is a temporary solution for the time while we are
developing return path, before making it the only way to handle commands.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message