vineetgarg02 commented on a change in pull request #696: HIVE-18842
URL: https://github.com/apache/hive/pull/696#discussion_r300095720
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java
 ##########
 @@ -4587,4 +4594,20 @@ private static void tryToLogClassPath(String prefix, 
ClassLoader loader, Logger
           loader == null ? "null" : loader.getClass().getSimpleName());
     }
   }
+
+  public static String encodeColumnNames(List<String> colNames) throws 
SemanticException {
+    try {
+      return JSON_MAPPER.writeValueAsString(colNames);
+    } catch (IOException e) {
+      throw new SemanticException(e);
+    }
+  }
+
+  public static List<String> decodeColumnNames(String colNamesStr) throws 
SemanticException {
+    try {
+      return JSON_MAPPER.readValue(colNamesStr, List.class);
 
 Review comment:
   Could there be case that `JSON_MAPPER` do not have `colNamesStr`? If so does 
it need to be handled differently?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to