deemoliu commented on a change in pull request #7087:
URL: https://github.com/apache/incubator-pinot/pull/7087#discussion_r661874775



##########
File path: 
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
##########
@@ -371,17 +373,26 @@ static void validatePartialUpsertStrategies(TableConfig 
tableConfig, Schema sche
     List<String> primaryKeyColumns = schema.getPrimaryKeyColumns();
     for (Map.Entry<String, UpsertConfig.Strategy> entry : 
partialUpsertStrategies.entrySet()) {
       String column = entry.getKey();
+      UpsertConfig.Strategy columnStrategy = entry.getValue();
       Preconditions.checkState(!primaryKeyColumns.contains(column), "Merger 
cannot be applied to primary key columns");
 
       FieldSpec fieldSpec = schema.getFieldSpecFor(column);
       Preconditions.checkState(fieldSpec != null, "Merger cannot be applied to 
non-existing column: %s", column);
 
-      if (entry.getValue() == UpsertConfig.Strategy.INCREMENT) {
+      if (columnStrategy == UpsertConfig.Strategy.INCREMENT) {
         
Preconditions.checkState(fieldSpec.getDataType().getStoredType().isNumeric(),
             "INCREMENT merger cannot be applied to non-numeric column: %s", 
column);
         Preconditions.checkState(!schema.getDateTimeNames().contains(column),
             "INCREMENT merger cannot be applied to date time column: %s", 
column);
       }
+
+      if (columnStrategy == UpsertConfig.Strategy.APPEND || columnStrategy == 
UpsertConfig.Strategy.UNION) {

Review comment:
       gotcha. Addressed the comment.




-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to