robertzych commented on code in PR #10463:
URL: https://github.com/apache/pinot/pull/10463#discussion_r1224683145


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java:
##########
@@ -527,6 +528,19 @@ static void validateTaskConfigs(TableConfig tableConfig, 
Schema schema) {
                   String.format("Column \"%s\" has invalid aggregate type: 
%s", entry.getKey(), entry.getValue()));
             }
           }
+        } else if (taskTypeConfigName.equals(UPSERT_COMPACTION_TASK_TYPE)) {
+          // check table is realtime
+          Preconditions.checkState(tableConfig.getTableType() == 
TableType.REALTIME,
+              "UpsertCompactionTask only supports realtime tables!");
+          // check upsert enabled
+          Preconditions.checkState(tableConfig.isUpsertEnabled(),
+              "Upsert must be enabled for UpsertCompactionTask");
+          // check no malformed period
+          
TimeUtils.convertPeriodToMillis(taskTypeConfig.getOrDefault("bufferTimePeriod", 
"2d"));

Review Comment:
   A precondition check isn't needed because if bufferTimePeriod is malformed 
then `TimeUtils.convertPeriodToMillis` will raise an IllegalArgumentException.



-- 
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