nsivabalan commented on a change in pull request #3968:
URL: https://github.com/apache/hudi/pull/3968#discussion_r751517703
##########
File path:
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/keygen/SimpleKeyGenerator.java
##########
@@ -36,8 +37,9 @@
private final SimpleAvroKeyGenerator simpleAvroKeyGenerator;
public SimpleKeyGenerator(TypedProperties props) {
- this(props,
props.getString(KeyGeneratorOptions.RECORDKEY_FIELD_NAME.key()),
- props.getString(KeyGeneratorOptions.PARTITIONPATH_FIELD_NAME.key()));
+ this(props,
Review comment:
why return a default value. KeyGenerators are generally used in the
write path where we take user records an generate record key and partition path
and update the values to meta fields. This is counter-intuitive. can you help
me understand this change.
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/HoodieTimelineArchiveLog.java
##########
@@ -329,7 +329,8 @@ private void writeToFile(Schema wrapperSchema,
List<IndexedRecord> records) thro
if (records.size() > 0) {
Map<HeaderMetadataType, String> header = new HashMap<>();
header.put(HoodieLogBlock.HeaderMetadataType.SCHEMA,
wrapperSchema.toString());
- HoodieAvroDataBlock block = new HoodieAvroDataBlock(records, header);
+ final String keyField =
table.getMetaClient().getTableConfig().getRecordKeyFieldProp();
Review comment:
with 0.10.0, we blow out the metadata and re-build right. Or are you
asking, if someone uses hudi-0.10.0 lib to read a old table w/o triggering a
single write to hudi table? bcoz, if one write is triggered, metadata will be
fully bootstrapped and I assume we add all these props to table props.
--
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]