Skip to content

Commit

Permalink
Adding a new config skipSegmentPreprocess in table IndexingConfig (ap…
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangfu0 authored Feb 4, 2025
1 parent c7fcda9 commit 3c02ec4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ public static ImmutableSegment load(SegmentDirectory segmentDirectory, IndexLoad
public static boolean needPreprocess(SegmentDirectory segmentDirectory, IndexLoadingConfig indexLoadingConfig,
@Nullable Schema schema)
throws Exception {
if (indexLoadingConfig.isSkipSegmentPreprocess()) {
return false;
}
if (needConvertSegmentFormat(indexLoadingConfig, segmentDirectory.getSegmentMetadata())) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ public void setErrorOnColumnBuildFailure(boolean errorOnColumnBuildFailure) {
_errorOnColumnBuildFailure = errorOnColumnBuildFailure;
}

public boolean isSkipSegmentPreprocess() {
return _tableConfig != null && _tableConfig.getIndexingConfig().isSkipSegmentPreprocess();
}

@Nullable
public FieldIndexConfigs getFieldIndexConfig(String columnName) {
if (_indexConfigsByColName == null || _dirty) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public class IndexingConfig extends BaseJsonConfig {
private boolean _aggregateMetrics;
private boolean _nullHandlingEnabled;
private boolean _columnMajorSegmentBuilderEnabled = true;
private boolean _skipSegmentPreprocess;

/**
* If `optimizeDictionary` enabled, dictionary is not created for the high-cardinality
Expand Down Expand Up @@ -361,6 +362,14 @@ public void setColumnMajorSegmentBuilderEnabled(boolean columnMajorSegmentBuilde
_columnMajorSegmentBuilderEnabled = columnMajorSegmentBuilderEnabled;
}

public boolean isSkipSegmentPreprocess() {
return _skipSegmentPreprocess;
}

public void setSkipSegmentPreprocess(boolean skipSegmentPreprocess) {
_skipSegmentPreprocess = skipSegmentPreprocess;
}

public boolean isOptimizeDictionary() {
return _optimizeDictionary;
}
Expand Down

0 comments on commit 3c02ec4

Please sign in to comment.