From 1c216a11527019209843d662cd7aa3905a5c6f53 Mon Sep 17 00:00:00 2001 From: Sergey Pershin Date: Mon, 13 Jan 2025 11:22:44 -0800 Subject: [PATCH] [native] Fix shuffle compression kind string in toVeloxConfigs() The current code sets integer to shuffle compression kind, while code expects a compression kind string. --- .../presto_cpp/main/QueryContextManager.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/presto-native-execution/presto_cpp/main/QueryContextManager.cpp b/presto-native-execution/presto_cpp/main/QueryContextManager.cpp index 9797fa5205f24..64462f0d3b7bf 100644 --- a/presto-native-execution/presto_cpp/main/QueryContextManager.cpp +++ b/presto-native-execution/presto_cpp/main/QueryContextManager.cpp @@ -228,12 +228,14 @@ QueryContextManager::toVeloxConfigs( if (it.second == "true") { // NOTE: Presto java only support lz4 compression so configure the same // compression kind on velox. - configs[core::QueryConfig::kShuffleCompressionKind] = std::to_string( - static_cast(velox::common::CompressionKind_LZ4)); + configs[core::QueryConfig::kShuffleCompressionKind] = + velox::common::compressionKindToString( + velox::common::CompressionKind_LZ4); } else { VELOX_USER_CHECK_EQ(it.second, "false"); - configs[core::QueryConfig::kShuffleCompressionKind] = std::to_string( - static_cast(velox::common::CompressionKind_NONE)); + configs[core::QueryConfig::kShuffleCompressionKind] = + velox::common::compressionKindToString( + velox::common::CompressionKind_NONE); } } else { configs[sessionProperties_.toVeloxConfig(it.first)] = it.second;