nsivabalan commented on code in PR #7132:
URL: https://github.com/apache/hudi/pull/7132#discussion_r1018258230
##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/HoodieIncrSource.java:
##########
@@ -172,10 +178,13 @@ public Pair<Option<Dataset<Row>>, String>
fetchNextBatch(Option<String> lastCkpt
*
* log.info("Validated Source Schema :" + validated.schema());
*/
+ boolean dropAllMetaFields =
props.getBoolean(Config.HOODIE_DROP_ALL_META_FIELDS_FROM_SOURCE,
+ Config.DEFAULT_HOODIE_DROP_ALL_META_FIELDS_FROM_SOURCE);
// Remove Hoodie meta columns except partition path from input source
- final Dataset<Row> src =
source.drop(HoodieRecord.HOODIE_META_COLUMNS.stream()
- .filter(x ->
!x.equals(HoodieRecord.PARTITION_PATH_METADATA_FIELD)).toArray(String[]::new));
+ String[] colsToDrop = dropAllMetaFields ?
HoodieRecord.HOODIE_META_COLUMNS.stream().toArray(String[]::new) :
+ HoodieRecord.HOODIE_META_COLUMNS.stream().filter(x ->
!x.equals(HoodieRecord.PARTITION_PATH_METADATA_FIELD)).toArray(String[]::new);
Review Comment:
I could not decode that. I don't see a need unless we want to carry over the
partitioning from tableA to tableB.
--
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]