yihua commented on code in PR #19304:
URL: https://github.com/apache/hudi/pull/19304#discussion_r4102939830
##########
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java:
##########
@@ -1387,6 +1399,19 @@ public Option<PartialUpdateMode> getPartialUpdateMode() {
}
}
+ /**
+ * @return the persisted record key encoding of a single-field complex key
generator table, if the
+ * table was upgraded from version 8 or below and the encoding was stamped.
Empty for tables created at
+ * version 9 and above (which always use {@link
ComplexKeyGenEncoding#FIELD_PREFIXED}) and for tables
+ * below version 9, where the property is never persisted.
+ */
+ public Option<ComplexKeyGenEncoding> getComplexKeyGenEncoding() {
+ if (getTableVersion().greaterThanOrEquals(HoodieTableVersion.NINE) &&
contains(COMPLEX_KEYGEN_ENCODING)) {
+ return
Option.of(ComplexKeyGenEncoding.fromString(getString(COMPLEX_KEYGEN_ENCODING)));
+ }
Review Comment:
Fixed
--
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]