Jackie-Jiang commented on code in PR #8688:
URL: https://github.com/apache/pinot/pull/8688#discussion_r872893712
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -481,6 +481,16 @@ 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().compareTo(column)
!= 0,
Review Comment:
```suggestion
Preconditions.checkState(!upsertConfig.getComparisonColumn().equals(column),
```
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -481,6 +481,16 @@ 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().compareTo(column)
!= 0,
+ "Merger cannot be applied to comparison column");
+ }
+
+ if (tableConfig.getValidationConfig().getTimeColumnName() != null) {
Review Comment:
We need to perform this check only when the comparison column is null. Also
time column should never be null for upsert table (real-time table)
--
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]