leesf commented on a change in pull request #2200:
URL: https://github.com/apache/hudi/pull/2200#discussion_r513480391
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/keygen/CustomKeyGenerator.java
##########
@@ -94,27 +82,18 @@ private String getPartitionPath(Option<GenericRecord>
record, Option<Row> row) {
PartitionKeyType keyType =
PartitionKeyType.valueOf(fieldWithType[1].toUpperCase());
switch (keyType) {
case SIMPLE:
- if (record.isPresent()) {
- partitionPath.append(new SimpleKeyGenerator(config,
partitionPathField).getPartitionPath(record.get()));
- } else {
- partitionPath.append(new SimpleKeyGenerator(config,
partitionPathField).getPartitionPath(row.get()));
- }
+ partitionPath.append(new SimpleKeyGenerator(config,
partitionPathField).getPartitionPath(record));
Review comment:
would this change the above behavior? above would also get `row.get`
----------------------------------------------------------------
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]