danny0405 commented on code in PR #19304:
URL: https://github.com/apache/hudi/pull/19304#discussion_r4090326856
##########
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableMetaClient.java:
##########
@@ -1595,6 +1605,16 @@ public Properties build() {
KeyGeneratorType type = KeyGeneratorType.valueOf(keyGeneratorType);
tableConfig.setValue(HoodieTableConfig.KEY_GENERATOR_TYPE,
type.name());
}
+ if (tableConfig.isComplexKeyGenWithSingleRecordKeyField() &&
metaFieldsMode.isRecordKeyPopulated()) {
+ // New tables store `<field>:<value>` keys. Only releases up to 1.0.2
(table version 8 and below) ever
+ // wrote bare values, so that encoding can only be declared for a
table created at such a version.
+ ComplexKeyGenEncoding encoding = complexKeyGenEncoding != null ?
complexKeyGenEncoding : ComplexKeyGenEncoding.FIELD_PREFIXED;
+ checkArgument(encoding == ComplexKeyGenEncoding.FIELD_PREFIXED ||
tableVersion.lesserThan(HoodieTableVersion.NINE),
+ String.format("%s=%s is only valid for a table created at version
%s or below; tables at version %s and above "
Review Comment:
If VALUE_ONLY is only allowed for pre-v9 table, why we even introduce this
table config option? a table config is designed to be configed freely by user
at least for new table versions?
can a pre-v9 table with VALUE_ONLY be upgraded into a v9 or v10 table, no?
--
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]