geeknarrator commented on code in PR #8781: URL: https://github.com/apache/pinot/pull/8781#discussion_r884155819
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java: ########## @@ -534,6 +534,19 @@ static void validateUpsertConfig(TableConfig tableConfig, Schema schema) { String comparisonCol = tableConfig.getUpsertConfig().getComparisonColumn(); Preconditions.checkState(schema.hasColumn(comparisonCol), "The comparison column does not exist on schema"); } + } + Preconditions.checkState(isAggregateMetricsEnabled(tableConfig), + "Metrics aggregation and upsert cannot be enabled together"); + } + + /** + * Checks if Metrics aggregation is enabled. + */ + @VisibleForTesting + static boolean isAggregateMetricsEnabled(TableConfig config) { + if(config.getIndexingConfig() == null || config.getIngestionConfig() == null) {return false; + } + return config.getIndexingConfig().isAggregateMetrics() && CollectionUtils.isEmpty(config.getIngestionConfig().getAggregationConfigs()); Review Comment: I think I referred `MutableSegmentImpl` and misunderstood. Fixed it. -- 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