alexeykudinkin commented on code in PR #6680:
URL: https://github.com/apache/hudi/pull/6680#discussion_r1015834881
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/BuiltinKeyGenerator.java:
##########
@@ -269,56 +255,40 @@ private <S> S combineCompositeRecordKeyInternal(
}
}
- private <S> S combinePartitionPathInternal(Supplier<StringBuilder<S>>
builderFactory,
- Function<Object, S> converter,
- Function<S, S> encoder,
- Function<S, S> emptyHandler,
- Object... partitionPathParts) {
- checkState(partitionPathParts.length == partitionPathFields.size());
- // Avoid creating [[StringBuilder]] in case there's just one
partition-path part,
- // and Hive-style of partitioning is not required
- if (!hiveStylePartitioning && partitionPathParts.length == 1) {
- return emptyHandler.apply(converter.apply(partitionPathParts[0]));
- }
-
- StringBuilder<S> sb = builderFactory.get();
- for (int i = 0; i < partitionPathParts.length; ++i) {
- S partitionPathPartStr =
encoder.apply(emptyHandler.apply(converter.apply(partitionPathParts[i])));
-
- if (hiveStylePartitioning) {
- sb.appendJava(partitionPathFields.get(i))
- .appendJava("=")
- .append(partitionPathPartStr);
- } else {
- sb.append(partitionPathPartStr);
- }
-
- if (i < partitionPathParts.length - 1) {
- sb.appendJava(DEFAULT_PARTITION_PATH_SEPARATOR);
+ private void tryInitRowConverter(StructType structType) {
Review Comment:
Check [this
comment](https://github.com/apache/hudi/pull/6680/files#r1007526943) for more
details
--
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]