hudi-agent commented on code in PR #20348:
URL: https://github.com/apache/hudi/pull/20348#discussion_r4281954686
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/upgrade/NineToEightDowngradeHandler.java:
##########
@@ -138,12 +143,37 @@ private void reconcileMergeConfigs(Map<ConfigProperty,
String> propertiesToAdd,
private void reconcileOrderingFieldsConfig(Map<ConfigProperty, String>
propertiesToAdd,
Set<ConfigProperty>
propertiesToRemove,
HoodieTableConfig tableConfig) {
- Option<String> orderingFieldsOpt =
MySqlDebeziumAvroPayload.class.getName().equals(tableConfig.getLegacyPayloadClass())
- ? Option.of(DebeziumConstants.ADDED_SEQ_COL_NAME)
- : tableConfig.getOrderingFieldsStr();
- orderingFieldsOpt.ifPresent(orderingFields -> {
- propertiesToAdd.put(HoodieTableConfig.PRECOMBINE_FIELD, orderingFields);
+ List<String> orderingFields =
getOrderingFieldsBelowVersionNine(tableConfig);
+ if (orderingFields.size() == 1) {
+ // the parsed field, so that a stray separator as in `ts,` does not end
up in a key read as one field name
Review Comment:
🤖 nit: could you reword this comment as a full sentence, e.g. "Write the
parsed field rather than the raw string, so a stray separator as in `ts,` does
not end up in the key"? As written it is a fragment that is hard to follow.
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]