danny0405 commented on code in PR #19342:
URL: https://github.com/apache/hudi/pull/19342#discussion_r3627898967


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/CustomAvroKeyGenerator.java:
##########
@@ -161,7 +162,7 @@ public String getPartitionPath(GenericRecord record) {
         partitionPath.append(DEFAULT_PARTITION_PATH_SEPARATOR);
       }
     }
-    return partitionPath.toString();
+    return 
PartitionPathEncodeUtils.validateNoPathTraversal(partitionPath.toString());

Review Comment:
   the per-row validation is perf sensitive, can we fix the directory-traversal 
only when `hoodie.datasource.write.partitionpath.urlencode=true` since the url 
encode looks like the right way to normalize the invalid chars. instead of 
throwing, can we automatically encode it as a valid partition path.
   
   Kind of conservative for introducing heavy per-row validations just for data 
quilities from a rare case.



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