diff --git a/presto-main/src/main/java/com/facebook/presto/SystemSessionProperties.java b/presto-main/src/main/java/com/facebook/presto/SystemSessionProperties.java index b59171f20d854..822c7cef221a8 100644 --- a/presto-main/src/main/java/com/facebook/presto/SystemSessionProperties.java +++ b/presto-main/src/main/java/com/facebook/presto/SystemSessionProperties.java @@ -328,6 +328,7 @@ public final class SystemSessionProperties public static final String NATIVE_WRITER_SPILL_ENABLED = "native_writer_spill_enabled"; public static final String NATIVE_ROW_NUMBER_SPILL_ENABLED = "native_row_number_spill_enabled"; public static final String NATIVE_TOPN_ROW_NUMBER_SPILL_ENABLED = "native_topn_row_number_spill_enabled"; + public static final String NATIVE_JOIN_SPILLER_PARTITION_BITS = "native_join_spiller_partition_bits"; public static final String NATIVE_EXECUTION_ENABLED = "native_execution_enabled"; public static final String NATIVE_EXECUTION_EXECUTABLE_PATH = "native_execution_executable_path"; public static final String NATIVE_EXECUTION_PROGRAM_ARGUMENTS = "native_execution_program_arguments"; @@ -1635,6 +1636,12 @@ public SystemSessionProperties( "Native Execution only. Enable topN row number spilling on native engine", false, false), + integerProperty( + NATIVE_JOIN_SPILLER_PARTITION_BITS, + "Native Execution only. The number of bits (N) used to calculate the " + + "spilling partition number for hash join and RowNumber: 2 ^ N", + 2, + false), booleanProperty( NATIVE_EXECUTION_ENABLED, "Enable execution on native engine", diff --git a/presto-native-execution/presto_cpp/main/QueryContextManager.cpp b/presto-native-execution/presto_cpp/main/QueryContextManager.cpp index 8301bb0d12388..159b5903aa1f4 100644 --- a/presto-native-execution/presto_cpp/main/QueryContextManager.cpp +++ b/presto-native-execution/presto_cpp/main/QueryContextManager.cpp @@ -52,6 +52,8 @@ std::string toVeloxConfig(const std::string& name) { {"native_writer_spill_enabled", QueryConfig::kWriterSpillEnabled}, {"native_row_number_spill_enabled", QueryConfig::kRowNumberSpillEnabled}, + {"native_join_spiller_partition_bits", + QueryConfig::kJoinSpillPartitionBits}, {"native_topn_row_number_spill_enabled", QueryConfig::kTopNRowNumberSpillEnabled}, {"native_debug_validate_output_from_operators",