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
9 changes: 9 additions & 0 deletions presto-docs/src/main/sphinx/presto_cpp/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,15 @@ If set to ``true``, disables the optimization in expression evaluation to delay

This should only be used for debugging purposes.

``native_selective_nimble_reader_enabled``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

Temporary flag to control whether selective Nimble reader should be used in this
query or not.

``native_join_spill_enabled``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ public final class SystemSessionProperties
public static final String NATIVE_DEBUG_DISABLE_COMMON_SUB_EXPRESSION = "native_debug_disable_common_sub_expressions";
public static final String NATIVE_DEBUG_DISABLE_EXPRESSION_WITH_MEMOIZATION = "native_debug_disable_expression_with_memoization";
public static final String NATIVE_DEBUG_DISABLE_EXPRESSION_WITH_LAZY_INPUTS = "native_debug_disable_expression_with_lazy_inputs";
public static final String NATIVE_SELECTIVE_NIMBLE_READER_ENABLED = "native_selective_nimble_reader_enabled";

public static final String NATIVE_MAX_PARTIAL_AGGREGATION_MEMORY = "native_max_partial_aggregation_memory";
public static final String NATIVE_MAX_EXTENDED_PARTIAL_AGGREGATION_MEMORY = "native_max_extended_partial_aggregation_memory";
Expand Down Expand Up @@ -1750,6 +1751,13 @@ public SystemSessionProperties(
"of lazy inputs unless required. Should only be used for debugging.",
false,
true),
booleanProperty(
NATIVE_SELECTIVE_NIMBLE_READER_ENABLED,
"Temporary flag to control whether selective Nimble reader should be " +
"used in this query or not. Will be removed after the selective Nimble " +
"reader is fully rolled out.",
false,
true),
longProperty(
NATIVE_MAX_PARTIAL_AGGREGATION_MEMORY,
"The max partial aggregation memory when data reduction is not optimal.",
Expand Down
10 changes: 10 additions & 0 deletions presto-native-execution/presto_cpp/main/SessionProperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,16 @@ SessionProperties::SessionProperties() {
QueryConfig::kDebugDisableExpressionWithLazyInputs,
boolToString(c.debugDisableExpressionsWithLazyInputs()));

addSessionProperty(
kSelectiveNimbleReaderEnabled,
"Temporary flag to control whether selective Nimble reader should be "
"used in this query or not. Will be removed after the selective Nimble "
"reader is fully rolled out.",
BOOLEAN(),
false,
QueryConfig::kSelectiveNimbleReaderEnabled,
boolToString(c.selectiveNimbleReaderEnabled()));

// If `legacy_timestamp` is true, the coordinator expects timestamp
// conversions without a timezone to be converted to the user's
// session_timezone.
Expand Down
6 changes: 6 additions & 0 deletions presto-native-execution/presto_cpp/main/SessionProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ class SessionProperties {
static constexpr const char* kDebugDisableExpressionWithLazyInputs =
"native_debug_disable_expression_with_lazy_inputs";

/// Temporary flag to control whether selective Nimble reader should be used
/// in this query or not. Will be removed after the selective Nimble reader
/// is fully rolled out.
static constexpr const char* kSelectiveNimbleReaderEnabled =
"native_selective_nimble_reader_enabled";

/// Enable timezone-less timestamp conversions.
static constexpr const char* kLegacyTimestamp = "legacy_timestamp";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ TEST_F(QueryContextManagerTest, nativeSessionProperties) {
{"native_debug_disable_common_sub_expressions", "true"},
{"native_debug_disable_expression_with_memoization", "true"},
{"native_debug_disable_expression_with_lazy_inputs", "true"},
{"native_selective_nimble_reader_enabled", "true"},
{"aggregation_spill_all", "true"}}};
auto queryCtx = taskManager_->getQueryContextManager()->findOrCreateQueryCtx(
taskId, session);
Expand All @@ -67,6 +68,7 @@ TEST_F(QueryContextManagerTest, nativeSessionProperties) {
EXPECT_TRUE(queryCtx->queryConfig().debugDisableCommonSubExpressions());
EXPECT_TRUE(queryCtx->queryConfig().debugDisableExpressionsWithMemoization());
EXPECT_TRUE(queryCtx->queryConfig().debugDisableExpressionsWithLazyInputs());
EXPECT_TRUE(queryCtx->queryConfig().selectiveNimbleReaderEnabled());
EXPECT_EQ(queryCtx->queryConfig().spillWriteBufferSize(), 1024);
}

Expand Down