tarun11Mavani commented on code in PR #19040:
URL: https://github.com/apache/pinot/pull/19040#discussion_r3664283222


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/openstruct/ImmutableOpenStructDataSource.java:
##########
@@ -84,8 +84,7 @@ public ComplexFieldSpec getFieldSpec() {
   @Override
   @Nullable
   public DataSource getDataSource(String key) {
-    DataSource ds = _perKeyDataSources.get(key);
-    return ds != null ? ds : _sparseDataSource;
+    return _perKeyDataSources.get(key);

Review Comment:
   Yes. This is an intentional change. 
   The reason for the flip: `_sparseDataSource` is one JSON blob shared by 
every sparse key, not the
   key's values, and it has the wrong type. Returning it meant a caller 
couldn't distinguish "key
   absent" from "key lives in sparse", so it couldn't choose a fallback.
   
   I have updated the SPI method declaration and the java doc for more clarity.



-- 
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]

Reply via email to