alexeykudinkin commented on code in PR #7413:
URL: https://github.com/apache/hudi/pull/7413#discussion_r1044853181


##########
hudi-client/hudi-java-client/src/main/java/org/apache/hudi/execution/bulkinsert/JavaCustomColumnsSortPartitioner.java:
##########
@@ -40,11 +42,14 @@
   private final String[] sortColumnNames;
   private final Schema schema;
   private final boolean consistentLogicalTimestampEnabled;
+  private final boolean isSortedByPartitionPath;
 
-  public JavaCustomColumnsSortPartitioner(String[] columnNames, Schema schema, 
boolean consistentLogicalTimestampEnabled) {
+  public JavaCustomColumnsSortPartitioner(String[] columnNames, Schema schema, 
HoodieWriteConfig config) {
+    String partitionPath = 
config.getString(KeyGeneratorOptions.PARTITIONPATH_FIELD_NAME);
+    this.isSortedByPartitionPath = columnNames.length > 0 && 
partitionPath.equals(columnNames[0]);

Review Comment:
   All partition columns should match not just the first one (partition path 
might be composed from multiple columns)



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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to