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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]