You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/07/07 23:12:43 UTC

[GitHub] [pinot] siddharthteotia commented on a diff in pull request #9004: Rename valueType to storedType in ForwardIndexReader

siddharthteotia commented on code in PR #9004:
URL: https://github.com/apache/pinot/pull/9004#discussion_r916343000


##########
pinot-core/src/main/java/org/apache/pinot/core/common/evaluators/DefaultJsonPathEvaluator.java:
##########
@@ -90,7 +90,7 @@ public <T extends ForwardIndexReaderContext> void evaluateBlock(int[] docIds, in
         }
       }
     } else {
-      switch (reader.getValueType()) {
+      switch (reader.getStoredType()) {

Review Comment:
   This is where I am mixed feelings about this change. The case statement goes over JSON as well which is not a storedType. JSON is logical type and uses STRING as stored type.
   
   https://github.com/apache/pinot/blob/master/pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java#L393
   
   `JSON(STRING, false, false),`
   
   Partly I think the change is right because when reading values out of forward index reader, we should do it based on the `storedType` that dictates how the bytes are stored. In that case, code like below should not reference JSON or any other logical type. So, additional cleanup is also needed.



##########
pinot-core/src/main/java/org/apache/pinot/core/common/evaluators/DefaultJsonPathEvaluator.java:
##########
@@ -90,7 +90,7 @@ public <T extends ForwardIndexReaderContext> void evaluateBlock(int[] docIds, in
         }
       }
     } else {
-      switch (reader.getValueType()) {
+      switch (reader.getStoredType()) {

Review Comment:
   This is where I am having mixed feelings about this change. The case statement goes over JSON as well which is not a storedType. JSON is logical type and uses STRING as stored type.
   
   https://github.com/apache/pinot/blob/master/pinot-spi/src/main/java/org/apache/pinot/spi/data/FieldSpec.java#L393
   
   `JSON(STRING, false, false),`
   
   Partly I think the change is right because when reading values out of forward index reader, we should do it based on the `storedType` that dictates how the bytes are stored. In that case, code like below should not reference JSON or any other logical type. So, additional cleanup is also needed.



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