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

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

                Author: ASF GitHub Bot
            Created on: 26/Jun/20 22:52
            Start Date: 26/Jun/20 22:52
    Worklog Time Spent: 10m 
      Work Description: jcamachor commented on a change in pull request #1119:
URL: https://github.com/apache/hive/pull/1119#discussion_r446442884



##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -101,6 +102,65 @@
   private volatile boolean isSparkConfigUpdated = false;
   private static final int LOG_PREFIX_LENGTH = 64;
 
+  interface HiveConfEnum<T extends Enum<T>> {
+    public static <T extends Enum<T>> T from(Class<T> cls, String value, T 
invalidEnum) {
+      try {
+        return T.valueOf(cls, value.toUpperCase());
+      } catch (Exception e) {
+        return invalidEnum;
+      }
+    }
+  }

Review comment:
       I am not sure we need the interface indeed, probably the utility method 
would suffice?




----------------------------------------------------------------
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:
[email protected]


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

    Worklog Id:     (was: 451782)
    Time Spent: 0.5h  (was: 20m)

> Cleanup HIVEQUERYRESULTFILEFORMAT handling
> ------------------------------------------
>
>                 Key: HIVE-23699
>                 URL: https://issues.apache.org/jira/browse/HIVE-23699
>             Project: Hive
>          Issue Type: Improvement
>          Components: HiveServer2
>    Affects Versions: 4.0.0
>            Reporter: John Sherman
>            Assignee: John Sherman
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> HIVEQUERYRESULTFILEFORMAT format handling has grown over the years and has 
> become somewhat messy code wise in SemanticAnalyzer and TaskCompiler. There 
> are special cases where the HIVEQUERYRESULTFILEFORMAT setting gets changed at 
> runtime that may cause issues if a user changes execution.engines between 
> queries and probably other corner cases.



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

Reply via email to