You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2021/05/24 17:36:28 UTC
[incubator-pinot] branch master updated: Use stored types instead
of derived types in Forward Indices. (#6960)
This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 1209bcc Use stored types instead of derived types in Forward Indices. (#6960)
1209bcc is described below
commit 1209bccea59af053e5eeda76f7c6803ca43e950c
Author: Amrish Lal <am...@gmail.com>
AuthorDate: Mon May 24 10:36:03 2021 -0700
Use stored types instead of derived types in Forward Indices. (#6960)
---
.../local/segment/index/column/PhysicalColumnIndexContainer.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/column/PhysicalColumnIndexContainer.java b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/column/PhysicalColumnIndexContainer.java
index a0244b3..d5ad483 100644
--- a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/column/PhysicalColumnIndexContainer.java
+++ b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/column/PhysicalColumnIndexContainer.java
@@ -180,7 +180,7 @@ public final class PhysicalColumnIndexContainer implements ColumnIndexContainer
}
} else {
// Raw index
- _forwardIndex = loadRawForwardIndex(fwdIndexBuffer, metadata.getDataType().getStoredType());
+ _forwardIndex = loadRawForwardIndex(fwdIndexBuffer, metadata.getDataType());
_dictionary = null;
_rangeIndex = null;
_invertedIndex = null;
@@ -281,15 +281,16 @@ public final class PhysicalColumnIndexContainer implements ColumnIndexContainer
}
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);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org