You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "gortiz (via GitHub)" <gi...@apache.org> on 2023/04/11 07:06:39 UTC
[GitHub] [pinot] gortiz commented on a diff in pull request #10553: Allow to overwrite index configs at tier level
gortiz commented on code in PR #10553:
URL: https://github.com/apache/pinot/pull/10553#discussion_r1162384815
##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/index/AbstractIndexType.java:
##########
@@ -48,8 +50,18 @@ public String getId() {
@Override
public Map<String, C> getConfig(TableConfig tableConfig, Schema schema) {
+ return getConfig(tableConfig, schema, null);
+ }
+
+ @Override
+ public Map<String, C> getConfig(TableConfig tableConfig, Schema schema, @Nullable String tier) {
+ if (tier != null) {
+ ColumnConfigDeserializer<C> deserializer =
+ _deserializersByTier.computeIfAbsent(tier, t -> createDeserializer(tier));
+ return deserializer.deserialize(tableConfig, schema);
+ }
if (_deserializer == null) {
- _deserializer = createDeserializer();
+ _deserializer = createDeserializer(null);
Review Comment:
So we are only caching the deserializer used when there is no tier? I think it would be better to never cache the deserializer or do it for all tiers.
For example, I would suggest to actually change ColumnCOnfigDeserializer in order to add the tier parameter there, so there would always be a single deserializer that is able to read any tier.
--
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-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org