KKcorps commented on code in PR #8688:
URL: https://github.com/apache/pinot/pull/8688#discussion_r876680357
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -481,6 +481,17 @@ static void validatePartialUpsertStrategies(TableConfig
tableConfig, Schema sche
UpsertConfig.Strategy columnStrategy = entry.getValue();
Preconditions.checkState(!primaryKeyColumns.contains(column), "Merger
cannot be applied to primary key columns");
+ if (upsertConfig.getComparisonColumn() != null) {
+
Preconditions.checkState(!upsertConfig.getComparisonColumn().equals(column),
+ "Merger cannot be applied to comparison column");
+ }
+
+ if (upsertConfig.getComparisonColumn() == null
+ && tableConfig.getValidationConfig().getTimeColumnName() != null) {
+
Preconditions.checkState(!tableConfig.getValidationConfig().getTimeColumnName().equals(column),
+ "Merger cannot be applied to time column");
+ }
Review Comment:
I didn't do the optimisation because I want to make it explicit to the user
what column is causing the issue. User might be confused that although he has
not defined any comparison column, it is still saying invalid config.
--
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]