siddharthteotia commented on code in PR #9333: URL: https://github.com/apache/pinot/pull/9333#discussion_r988814412
########## pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/defaultcolumn/BaseDefaultColumnHandler.java: ########## @@ -224,6 +225,21 @@ Map<String, DefaultColumnAction> computeDefaultColumnActionMap() { if (columnMetadata != null) { // Column exists in the segment, check if we need to update the value. + if (_segmentWriter != null && !columnMetadata.isAutoGenerated()) { + // Check that forward index disabled isn't enabled / disabled on an existing column (not auto-generated). + // TODO: Add support for reloading segments when forward index disabled flag is enabled or disabled + boolean forwardIndexDisabled = !_segmentWriter.hasIndexFor(column, ColumnIndexType.FORWARD_INDEX); + if (forwardIndexDisabled != _indexLoadingConfig.getForwardIndexDisabledColumns() + .contains(column)) { + String failureMessage = + "Forward index disabled in segment: " + forwardIndexDisabled + " for column: " + column + + " does not match forward index disabled flag: " + + _indexLoadingConfig.getForwardIndexDisabledColumns().contains(column) + " in the TableConfig, " + + "updating this flag is not supported at the moment."; Review Comment: Not just updating / toggling, even `setting` this flag for the very first time for an existing column is not supported (yet) on the reload path. I think we should also log a warning for now and ignore and until the reload support is added, anyone who wants to leverage this feature on an existing column should consider backfilling / refresh -- 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-unsubscr...@pinot.apache.org 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