diff --git a/presto-native-execution/presto_cpp/main/SessionProperties.cpp b/presto-native-execution/presto_cpp/main/SessionProperties.cpp index 5a8d9a0edd438..7dd851ec1ef37 100644 --- a/presto-native-execution/presto_cpp/main/SessionProperties.cpp +++ b/presto-native-execution/presto_cpp/main/SessionProperties.cpp @@ -562,12 +562,12 @@ SessionProperties::SessionProperties() { std::to_string(c.maxOutputBatchRows())); addSessionProperty( - kRowSizeTrackingEnabled, - "A fallback for average row size estimate when not supported for certain readers. Turned on by default.", - BOOLEAN(), + kRowSizeTrackingMode, + "Enable (reader) row size tracker as a fallback to file level row size estimates.", + INTEGER(), true, - QueryConfig::kRowSizeTrackingEnabled, - std::to_string(c.rowSizeTrackingEnabled())); + QueryConfig::kRowSizeTrackingMode, + std::to_string(static_cast(c.rowSizeTrackingMode()))); addSessionProperty( kUseVeloxGeospatialJoin, diff --git a/presto-native-execution/presto_cpp/main/SessionProperties.h b/presto-native-execution/presto_cpp/main/SessionProperties.h index 4db928cdd641d..d24b47d41daee 100644 --- a/presto-native-execution/presto_cpp/main/SessionProperties.h +++ b/presto-native-execution/presto_cpp/main/SessionProperties.h @@ -365,8 +365,7 @@ class SessionProperties { /// Enable (reader) row size tracker as a fallback to file level row size /// estimates. - static constexpr const char* kRowSizeTrackingEnabled = - "row_size_tracking_enabled"; + static constexpr const char* kRowSizeTrackingMode = "row_size_tracking_mode"; /// If this is true, then the protocol::SpatialJoinNode is converted to a /// velox::core::SpatialJoinNode. Otherwise, it is converted to a diff --git a/presto-native-execution/presto_cpp/main/tests/QueryContextManagerTest.cpp b/presto-native-execution/presto_cpp/main/tests/QueryContextManagerTest.cpp index 1c501e662f9ae..e9260baa0cc59 100644 --- a/presto-native-execution/presto_cpp/main/tests/QueryContextManagerTest.cpp +++ b/presto-native-execution/presto_cpp/main/tests/QueryContextManagerTest.cpp @@ -16,6 +16,7 @@ #include #include "presto_cpp/main/TaskManager.h" #include "presto_cpp/main/common/Configs.h" +#include "velox/core/QueryConfig.h" namespace facebook::presto { @@ -79,7 +80,9 @@ TEST_F(QueryContextManagerTest, nativeSessionProperties) { EXPECT_TRUE(queryCtx->queryConfig().debugDisableExpressionsWithMemoization()); EXPECT_TRUE(queryCtx->queryConfig().debugDisableExpressionsWithLazyInputs()); EXPECT_TRUE(queryCtx->queryConfig().selectiveNimbleReaderEnabled()); - EXPECT_TRUE(queryCtx->queryConfig().rowSizeTrackingEnabled()); + EXPECT_EQ( + queryCtx->queryConfig().rowSizeTrackingMode(), + facebook::velox::core::QueryConfig::RowSizeTrackingMode::ENABLED_FOR_ALL); EXPECT_EQ(queryCtx->queryConfig().preferredOutputBatchBytes(), 10UL << 20); EXPECT_EQ(queryCtx->queryConfig().preferredOutputBatchRows(), 1024); EXPECT_EQ(queryCtx->queryConfig().spillWriteBufferSize(), 1024); diff --git a/presto-native-execution/velox b/presto-native-execution/velox index 7d8ab801b82ca..dd53fc055ead1 160000 --- a/presto-native-execution/velox +++ b/presto-native-execution/velox @@ -1 +1 @@ -Subproject commit 7d8ab801b82caaaace9a95a97cac85279d431669 +Subproject commit dd53fc055ead1985de532a8a19696a886219331c