snleee commented on code in PR #9309:
URL: https://github.com/apache/pinot/pull/9309#discussion_r966626344
##########
pinot-common/src/main/java/org/apache/pinot/common/utils/config/TableConfigUtils.java:
##########
@@ -165,9 +166,18 @@ public static TableConfig fromZNRecord(ZNRecord znRecord)
new TypeReference<Map<InstancePartitionsType, String>>() { });
}
+ Map<InstancePartitionsType, SegmentAssignmentConfig>
segmentAssignmentConfigMap = null;
+ String segmentAssignmentConfigMapString =
simpleFields.get(TableConfig.SEGMENT_ASSIGNMENT_CONFIG_MAP_KEY);
+ if (segmentAssignmentConfigMapString != null) {
+ segmentAssignmentConfigMap =
JsonUtils.stringToObject(segmentAssignmentConfigMapString,
+ new TypeReference<>() {
Review Comment:
Compatibility test is complaining the following:
```
[INFO] -------------------------------------------------------------
Error: COMPILATION ERROR :
[INFO] -------------------------------------------------------------
Error:
/home/runner/work/pinot/pinot/pinot-common/src/main/java/org/apache/pinot/common/utils/config/TableConfigUtils.java:[173,27]
error: cannot infer type arguments for TypeReference<T>
reason: cannot use '<>' with anonymous inner classes
where T is a type-variable:
T extends Object declared in class TypeReference
```
It looks that we need to provide the Map types correctly.
` new TypeReference<>() -> new
TypeReference<Map<InstanceParttitionsType,String>>()`
--
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]