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 @@ -193,6 +193,14 @@ Use this threshold to manage memory usage more efficiently during `ORDER BY` ope

Native Execution only. Enable row number spilling on native engine.

``native_mark_distinct_spill_enabled``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

* **Type:** ``boolean``
* **Default value:** ``false``

Native Execution only. Enable mark distinct spilling on native engine.

``native_simplified_expression_evaluation_enabled``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public class NativeWorkerSessionPropertyProvider
public static final String NATIVE_WRITER_SPILL_ENABLED = "native_writer_spill_enabled";
public static final String NATIVE_WRITER_FLUSH_THRESHOLD_BYTES = "native_writer_flush_threshold_bytes";
public static final String NATIVE_ROW_NUMBER_SPILL_ENABLED = "native_row_number_spill_enabled";
public static final String NATIVE_MARK_DISTINCT_SPILL_ENABLED = "native_mark_distinct_spill_enabled";
public static final String NATIVE_TOPN_ROW_NUMBER_SPILL_ENABLED = "native_topn_row_number_spill_enabled";
public static final String NATIVE_SPILLER_NUM_PARTITION_BITS = "native_spiller_num_partition_bits";
public static final String NATIVE_DEBUG_VALIDATE_OUTPUT_FROM_OPERATORS = "native_debug_validate_output_from_operators";
Expand Down Expand Up @@ -189,6 +190,11 @@ public NativeWorkerSessionPropertyProvider(FeaturesConfig featuresConfig)
"Native Execution only. Enable row number spilling on native engine",
false,
!nativeExecution),
booleanProperty(
NATIVE_MARK_DISTINCT_SPILL_ENABLED,
"Native Execution only. Enable mark distinct spilling on native engine",
false,
!nativeExecution),
booleanProperty(
NATIVE_TOPN_ROW_NUMBER_SPILL_ENABLED,
"Native Execution only. Enable topN row number spilling on native engine",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,14 @@ SessionProperties::SessionProperties() {
QueryConfig::kRowNumberSpillEnabled,
boolToString(c.rowNumberSpillEnabled()));

addSessionProperty(
kMarkDistinctSpillEnabled,
"Native Execution only. Enable mark distinct spilling on native engine",
BOOLEAN(),
false,
QueryConfig::kMarkDistinctSpillEnabled,
boolToString(c.markDistinctSpillEnabled()));

addSessionProperty(
kSpillerNumPartitionBits,
"The number of bits (N) used to calculate the spilling "
Expand Down
4 changes: 4 additions & 0 deletions presto-native-execution/presto_cpp/main/SessionProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ class SessionProperties {
static constexpr const char* kRowNumberSpillEnabled =
"native_row_number_spill_enabled";

/// Enable mark distinct spilling on native engine.
static constexpr const char* kMarkDistinctSpillEnabled =
"native_mark_distinct_spill_enabled";

/// The compression algorithm type to compress the spilled data.
static constexpr const char* kSpillCompressionCodec =
"native_spill_compression_codec";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ TEST_F(SessionPropertiesTest, validateMapping) {
core::QueryConfig::kWriterFlushThresholdBytes},
{SessionProperties::kRowNumberSpillEnabled,
core::QueryConfig::kRowNumberSpillEnabled},
{SessionProperties::kMarkDistinctSpillEnabled,
core::QueryConfig::kMarkDistinctSpillEnabled},
{SessionProperties::kSpillerNumPartitionBits,
core::QueryConfig::kSpillNumPartitionBits},
{SessionProperties::kTopNRowNumberSpillEnabled,
Expand Down
Loading