gortiz commented on code in PR #10687:
URL: https://github.com/apache/pinot/pull/10687#discussion_r1183499996
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/inverted/InvertedIndexType.java:
##########
@@ -193,4 +196,16 @@ public InvertedIndexReader
createSkippingForward(SegmentDirectory.Reader segment
protected void handleIndexSpecificCleanup(TableConfig tableConfig) {
tableConfig.getIndexingConfig().setInvertedIndexColumns(null);
}
+
+ @Nullable
+ @Override
+ public MutableIndex createMutableIndex(MutableIndexContext context,
IndexConfig config) {
+ if (config.isDisabled()) {
+ return null;
+ }
+ if (!context.hasDictionary()) {
+ return null;
Review Comment:
I guess this is similar to what Neha asked
[here](https://github.com/apache/pinot/pull/10687#discussion_r1183142857).
The TL;DR: is that in that situation previous code didn't fail but simply
ignore the index, so that is what we do here.
There is a difference, though: In previous code the MutableIndex was created
and stored, but no row was ever added to it. With this version the MutableIndex
is never created. I'm assuming both behaviors are compatible. Queries that
theoretically could use the index, should be skipping it in the older case or
otherwise they would return invalid data (because it is actually empty)
--
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]