deepthi912 commented on code in PR #18552:
URL: https://github.com/apache/pinot/pull/18552#discussion_r3278424631
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -1316,55 +1317,68 @@ private static void
validateUpsertConfigUpdate(TableConfig newConfig, TableConfi
boolean existingUpsertEnabled = existingConfig.isUpsertEnabled();
boolean newUpsertEnabled = newConfig.isUpsertEnabled();
- // Check if upsert is being added or removed
if (existingUpsertEnabled != newUpsertEnabled) {
if (existingUpsertEnabled) {
- LOGGER.info("upsertConfig is removed from existing upsert table: {}",
newConfig.getTableName());
- } else {
- LOGGER.info("upsertConfig is added to existing non-upsert table: {}",
newConfig.getTableName());
- }
- } else if (existingUpsertEnabled) {
- UpsertConfig existingUpsertConfig = existingConfig.getUpsertConfig();
- UpsertConfig newUpsertConfig = newConfig.getUpsertConfig();
-
- if (existingUpsertConfig.getMode() != newUpsertConfig.getMode()) {
violations.add(
- String.format("upsertConfig.mode (%s -> %s)",
existingUpsertConfig.getMode(), newUpsertConfig.getMode()));
- }
- if (existingUpsertConfig.getHashFunction() !=
newUpsertConfig.getHashFunction()) {
- violations.add(String.format("upsertConfig.hashFunction (%s -> %s)",
existingUpsertConfig.getHashFunction(),
- newUpsertConfig.getHashFunction()));
- }
- if (!Objects.equals(existingUpsertConfig.getComparisonColumns(),
- newUpsertConfig.getComparisonColumns())) {
+ String.format("Cannot remove upsertConfig from existing upsert
table: %s", newConfig.getTableName()));
Review Comment:
I think some customers might want this on their existing tables i.e add
upsert or remove upsert which is why I didn't add it into violation.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]