Jackie-Jiang commented on a change in pull request #6719: URL: https://github.com/apache/incubator-pinot/pull/6719#discussion_r620728733
########## File path: pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/SegmentColumnarIndexCreator.java ########## @@ -235,33 +234,32 @@ public void init(SegmentGeneratorConfig segmentCreationSpec, SegmentIndexCreatio Preconditions.checkState(!invertedIndexColumns.contains(columnName), "Cannot create inverted index for raw index column: %s", columnName); - ChunkCompressionType compressionType = - getColumnCompressionType(segmentCreationSpec, fieldSpec); + ChunkCompressionType compressionType = getColumnCompressionType(segmentCreationSpec, fieldSpec); // Initialize forward index creator boolean deriveNumDocsPerChunk = shouldDeriveNumDocsPerChunk(columnName, segmentCreationSpec.getColumnProperties()); int writerVersion = rawIndexWriterVersion(columnName, segmentCreationSpec.getColumnProperties()); _forwardIndexCreatorMap.put(columnName, - getRawIndexCreatorForColumn(_indexDir, compressionType, columnName, fieldSpec.getDataType(), totalDocs, + getRawIndexCreatorForColumn(_indexDir, compressionType, columnName, storedType, totalDocs, indexCreationInfo.getLengthOfLongestEntry(), deriveNumDocsPerChunk, writerVersion)); } if (textIndexColumns.contains(columnName)) { // Initialize text index creator Preconditions.checkState(fieldSpec.isSingleValueField(), "Text index is currently only supported on single-value columns"); - Preconditions.checkState(fieldSpec.getDataType() == STRING, - "Text index is currently only supported on STRING type columns"); + Preconditions + .checkState(storedType == DataType.STRING, "Text index is currently only supported on STRING type columns"); Review comment: We can add more logical type check in the future, but for existing checks I keep it physical type check so that it is backward-compatible -- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org