yanghua commented on a change in pull request #3842:
URL: https://github.com/apache/hudi/pull/3842#discussion_r734266798



##########
File path: hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableSource.java
##########
@@ -268,6 +266,16 @@ private DataType getProducedDataType() {
     return requiredPartitions;
   }
 
+  private String getSourceOperatorName(String operatorName) {
+    String[] schemaFieldNames = this.schema.getColumnNames().toArray(new 
String[0]);
+    List<String> fields = Arrays.stream(Arrays.stream(this.requiredPos)
+        .mapToObj(i -> schemaFieldNames[i])
+        .toArray(String[]::new))
+        .collect(Collectors.toList());

Review comment:
       Can we simply replace this snappet with a `StringBuilder` like this:
   
   ```
   sb.append("[");
       Arrays.stream(this.requiredPos)
           .mapToObj(i -> schemaFieldNames[i])
           .forEach(s -> {
             sb.append(s);
             sb.append(",");
           });
   ...
   ```
   




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

To unsubscribe, e-mail: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to