codope commented on code in PR #5294:
URL: https://github.com/apache/hudi/pull/5294#discussion_r848269526
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java:
##########
@@ -477,14 +479,19 @@ private Pair<SchemaProvider, Pair<String,
JavaRDD<HoodieRecord>>> fetchFromSourc
}
boolean shouldCombine = cfg.filterDupes ||
cfg.operation.equals(WriteOperationType.UPSERT);
+ boolean isDropPartitionColumns =
props.getBoolean(DROP_PARTITION_COLUMNS.key());
+ String partitionColumns =
HoodieSparkUtils.getPartitionColumns(keyGenerator, props);
+ List<String> listOfPartitionColumns =
Arrays.asList(partitionColumns.split(","));
JavaRDD<GenericRecord> avroRDD = avroRDDOptional.get();
+ HoodieKey key = keyGenerator.getKey(avroRDD.first());
JavaRDD<HoodieRecord> records = avroRDD.map(gr -> {
+ gr = isDropPartitionColumns ? HoodieAvroUtils.removeFields(gr,
listOfPartitionColumns) : gr;
Review Comment:
Filed HUDI-3863 as followup. Feel free to pick it up.
--
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]