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 2021/05/23 06:50:10 UTC
[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #6960: Use stored types instead of derived types in Forward Indices.
Jackie-Jiang commented on a change in pull request #6960:
URL: https://github.com/apache/incubator-pinot/pull/6960#discussion_r637497245
##########
File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/column/PhysicalColumnIndexContainer.java
##########
@@ -281,17 +281,18 @@ public static BaseImmutableDictionary loadDictionary(PinotDataBuffer dictionaryB
}
private static ForwardIndexReader<?> loadRawForwardIndex(PinotDataBuffer forwardIndexBuffer, DataType dataType) {
- switch (dataType.getStoredType()) {
+ DataType storedType = dataType.getStoredType();
+ switch (storedType) {
case INT:
case LONG:
case FLOAT:
case DOUBLE:
- return new FixedByteChunkSVForwardIndexReader(forwardIndexBuffer, dataType);
+ return new FixedByteChunkSVForwardIndexReader(forwardIndexBuffer, storedType);
case STRING:
case BYTES:
- return new VarByteChunkSVForwardIndexReader(forwardIndexBuffer, dataType);
+ return new VarByteChunkSVForwardIndexReader(forwardIndexBuffer, storedType);
default:
- throw new IllegalStateException("Illegal data type for raw forward index: " + dataType);
+ throw new IllegalStateException("Illegal data type for raw forward index: " + storedType);
Review comment:
Recommend putting `dataType` here to log the actual type instead of the stored type
--
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.
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