gortiz commented on code in PR #12265:
URL: https://github.com/apache/pinot/pull/12265#discussion_r1498929879
##########
pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/AbstractSerdeIndexContract.java:
##########
@@ -103,6 +106,14 @@ protected <C extends IndexConfig> C getActualConfig(String
column, IndexType<C,
return confMap.get(column).getConfig(type);
}
+ protected <C extends IndexConfig> C getActualFromIndexLoadingConfig(String
column, IndexType<C, ?, ?> type) {
+ IndexLoadingConfig indexLoadingConfig = new
IndexLoadingConfig(_tableConfig, _schema);
+ Map<String, FieldIndexConfigs> confMap =
+ FieldIndexConfigsUtil.createIndexConfigsByColName(_tableConfig,
_schema, indexLoadingConfig::getDeserializer);
+
+ return confMap.get(column).getConfig(type);
+ }
Review Comment:
This can be changed to:
```java
protected <C extends IndexConfig> C getActualFromIndexLoadingConfig(String
column, IndexType<C, ?, ?> type) {
IndexLoadingConfig indexLoadingConfig = new
IndexLoadingConfig(_tableConfig, _schema);
return indexLoadingConfig.calculateIndexConfigsByColName()
.get(column)
.getConfig(type);
}
```
By doing that we don't need to make `IndexingLoadingConfig.getDeserializer`
public, so the encapsulation is better.
--
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]