-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DH-18300: Improve DataIndex performance.
DataIndex, particularly when used for where() filters had missing parallelization opportunities; and would read more data than strictly necessary to satisfy the filter. Statistics have been added to various operations, the existing Value class was not thread safe. The internal state has been updated to use volatiles and AtomicLongFieldUpdaters. The following Configuration properties have been added: - AbstractColumnSource.usePartialDataIndex - AbstractColumnSource.useParallelIndexBuild - QueryTable.useDataIndexForAggregation - MergedDataIndex.useParallelLazyFetch
- Loading branch information
Showing
14 changed files
with
561 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
engine/api/src/main/java/io/deephaven/engine/table/DataIndexOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// | ||
// Copyright (c) 2016-2024 Deephaven Data Labs and Patent Pending | ||
// | ||
package io.deephaven.engine.table; | ||
|
||
import io.deephaven.annotations.BuildableStyle; | ||
import io.deephaven.api.filter.Filter; | ||
import org.immutables.value.Value; | ||
|
||
/** | ||
* Options for controlling the function of a {@link DataIndex}. | ||
* | ||
* <p> | ||
* Presently, this is used for the {@link Table#where(Filter)} operation to more efficiently handle data index matches, | ||
* without necessarily reading all RowSet information from disk across partitions. | ||
* </p> | ||
*/ | ||
@Value.Immutable | ||
@BuildableStyle | ||
public interface DataIndexOptions { | ||
DataIndexOptions DEFAULT = DataIndexOptions.builder().build(); | ||
|
||
/** | ||
* Does this operation use only a subset of the DataIndex? | ||
* | ||
* <p> | ||
* The DataIndex implementation may use this hint to defer work for some row sets. | ||
* </p> | ||
* | ||
* @return if this operation is only going to use a subset of this data index | ||
*/ | ||
@Value.Default | ||
default boolean operationUsesPartialTable() { | ||
return false; | ||
} | ||
|
||
/** | ||
* Create a new builder for a {@link DataIndexOptions}. | ||
* | ||
* @return | ||
*/ | ||
static Builder builder() { | ||
return ImmutableDataIndexOptions.builder(); | ||
} | ||
|
||
/** | ||
* The builder interface to construct a {@link DataIndexOptions}. | ||
*/ | ||
interface Builder { | ||
/** | ||
* Set whether this operation only uses a subset of the data index. | ||
* | ||
* @param usesPartialTable true if this operation only uses a partial table | ||
* @return this builder | ||
*/ | ||
Builder operationUsesPartialTable(boolean usesPartialTable); | ||
|
||
/** | ||
* Build the {@link DataIndexOptions}. | ||
* | ||
* @return an immutable DataIndexOptions structure. | ||
*/ | ||
DataIndexOptions build(); | ||
} | ||
} |
Oops, something went wrong.