imay commented on a change in pull request #1695: Refactor alter job
URL: https://github.com/apache/incubator-doris/pull/1695#discussion_r319372633
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/DataDescription.java
 ##########
 @@ -65,34 +67,43 @@
 public class DataDescription {
     private static final Logger LOG = 
LogManager.getLogger(DataDescription.class);
     public static String FUNCTION_HASH_HLL = "hll_hash";
-    private static final List<String> hadoopSupportFunctionName = 
Arrays.asList("strftime", "time_format",
+    private static final List<String> HADOOP_SUPPORT_FUNCTION_NAMES = 
Arrays.asList(
+            "strftime",
+            "time_format",
             "alignment_timestamp",
-            "default_value", "md5sum",
-            "replace_value", "now",
-            "hll_hash");
+            "default_value",
+            "md5sum",
+            "replace_value",
+            "now", "hll_hash",
+            "substitute");
+
     private final String tableName;
     private final List<String> partitionNames;
     private final List<String> filePaths;
     // the column name list of data desc
-    private final List<String> columns;
+    private List<String> columns;
     private final ColumnSeparator columnSeparator;
     private final String fileFormat;
     private final List<String> columnsFromPath;
     private final boolean isNegative;
+    // save column mapping in SET(xxx = xxx) clause
     private final List<Expr> columnMappingList;
 
     // Used for mini load
     private TNetworkAddress beAddr;
     private String lineDelimiter;
 
-    // This param only include the hadoop function which need to be checked in 
the future.
-    // For hadoop load, this param is also used to persistence.
-    private Map<String, Pair<String, List<String>>> columnToHadoopFunction;
-    /**
+    /*
      * Merged from columns and columnMappingList
      * ImportColumnDesc: column name to expr or null
-     **/
-    private List<ImportColumnDesc> parsedColumnExprList;
+     */
+    private List<ImportColumnDesc> parsedColumnExprList = Lists.newArrayList();
+    /*
+     * This param only include the hadoop function which need to be checked in 
the future.
+     * For hadoop load, this param is also used to persistence.
+     * The function in this param is copied from 'parsedColumnExprList'
+     */
+    private Map<String, Pair<String, List<String>>> columnToHadoopFunction = 
Maps.newHashMap();
 
 Review comment:
   ```suggestion
       private Map<String, Pair<String, List<String>>> columnToHadoopFunction = 
Maps.newTreeMap(String.CASE_INSENSITIVE_ORDER);
   ```

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