belugabehr commented on a change in pull request #2368:
URL: https://github.com/apache/hive/pull/2368#discussion_r647522110



##########
File path: 
serde/src/java/org/apache/hadoop/hive/serde2/ColumnProjectionUtils.java
##########
@@ -234,7 +235,7 @@ private static void appendReadColumnNames(Configuration 
conf, List<String> cols)
       if (first) {
         first = false;
       } else {
-        result.append(',');
+        result.append(conf.get(serdeConstants.COLUMN_NAME_DELIMITER, 
String.valueOf(SerDeUtils.COMMA)));

Review comment:
       ```java
       boolean first = old.isEmpty();
       for(String col: cols) {
         if (first) {
           first = false;
         } else {
           result.append(conf.get(serdeConstants.COLUMN_NAME_DELIMITER, 
String.valueOf(SerDeUtils.COMMA)));
         }
         result.append(col);
       }
   ```
   
   Can this just be simplified to something like:
   
   ```java
   String delim = conf.get(serdeConstants.COLUMN_NAME_DELIMITER, 
String.valueOf(SerDeUtils.COMMA))
   String xxx = String.join(delim, cols);
   ```




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



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

Reply via email to