Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public class IndexLoadingConfig {
private final Map<String, String> _noDictionaryConfig = new HashMap<>();
private final Set<String> _varLengthDictionaryColumns = new HashSet<>();
private Set<String> _onHeapDictionaryColumns = new HashSet<>();
private final Set<String> _forwardIndexDisabledColumns = new HashSet<>();
private Map<String, BloomFilterConfig> _bloomFilterConfigs = new HashMap<>();
private boolean _enableDynamicStarTreeCreation;
private List<StarTreeIndexConfig> _starTreeIndexConfigs;
Expand Down Expand Up @@ -540,10 +539,6 @@ public Set<String> getOnHeapDictionaryColumns() {
return unmodifiable(_onHeapDictionaryColumns);
}

public Set<String> getForwardIndexDisabledColumns() {
return unmodifiable(_forwardIndexDisabledColumns);
}

public Map<String, BloomFilterConfig> getBloomFilterConfigs() {
return unmodifiable(_bloomFilterConfigs);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ protected boolean createColumnV1Indices(String column)
}

// TODO: Support forward index disabled derived column
if (_indexLoadingConfig.getForwardIndexDisabledColumns().contains(column)) {
if (isForwardIndexDisabled(column)) {
LOGGER.warn("Skip creating forward index disabled derived column: {}", column);
if (errorOnFailure) {
throw new UnsupportedOperationException(
Expand Down Expand Up @@ -443,8 +443,8 @@ protected boolean createColumnV1Indices(String column)
* Check and return whether the forward index is disabled for a given column
*/
protected boolean isForwardIndexDisabled(String column) {
return _indexLoadingConfig.getForwardIndexDisabledColumns() != null
&& _indexLoadingConfig.getForwardIndexDisabledColumns().contains(column);
FieldIndexConfigs fieldIndexConfig = _indexLoadingConfig.getFieldIndexConfig(column);
return fieldIndexConfig != null && fieldIndexConfig.getConfig(StandardIndexes.forward()).isDisabled();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ private void validateIndex(IndexType<?, ?, ?> indexType, String column, int card
assertFalse(reader.hasIndexFor(column, StandardIndexes.inverted()));
} else {
// Updating dictionary or forward index for existing columns not supported for v1 segments yet
if (segmentMetadata.getVersion() == SegmentVersion.v3) {
if (segmentMetadata.getVersion() == SegmentVersion.v3 || isAutoGenerated) {
assertFalse(reader.hasIndexFor(column, StandardIndexes.forward()));
} else {
assertTrue(reader.hasIndexFor(column, StandardIndexes.forward()));
Expand Down

This file was deleted.

Loading
Loading