yupeng9 commented on a change in pull request #7906: URL: https://github.com/apache/pinot/pull/7906#discussion_r769874443
########## File path: pinot-spi/src/main/java/org/apache/pinot/spi/config/table/UpsertConfig.java ########## @@ -87,6 +93,10 @@ public HashFunction getHashFunction() { return _partialUpsertStrategies; } + public Strategy getGlobalUpsertStrategy() { Review comment: I assume this strategy applies to partial upsert only, right? ########## File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/upsert/PartialUpsertHandler.java ########## @@ -48,13 +49,27 @@ private final String _tableNameWithType; private boolean _allSegmentsLoaded; - public PartialUpsertHandler(HelixManager helixManager, String tableNameWithType, - Map<String, UpsertConfig.Strategy> partialUpsertStrategies) { + public PartialUpsertHandler(HelixManager helixManager, String tableNameWithType, Schema schema, + Map<String, UpsertConfig.Strategy> partialUpsertStrategies, UpsertConfig.Strategy globalUpsertStrategy) { _helixManager = helixManager; _tableNameWithType = tableNameWithType; for (Map.Entry<String, UpsertConfig.Strategy> entry : partialUpsertStrategies.entrySet()) { _column2Mergers.put(entry.getKey(), PartialUpsertMergerFactory.getMerger(entry.getValue())); } + + if (schema != null) { + for (String dimensionName : schema.getDimensionNames()) { + if (!schema.getPrimaryKeyColumns().contains(dimensionName) && !_column2Mergers.containsKey(dimensionName)) { + _column2Mergers.put(dimensionName, PartialUpsertMergerFactory.getMerger(globalUpsertStrategy)); Review comment: I think `globalUpsertStrategy ` can be null? Shall we always assign a default value? -- 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