Skip to content

Commit

Permalink
[native] Fix shuffle compression kind string in toVeloxConfigs()
Browse files Browse the repository at this point in the history
The current code sets integer to shuffle compression kind, while
code expects a compression kind string.
  • Loading branch information
spershin committed Jan 13, 2025
1 parent 378a4d4 commit 1c216a1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions presto-native-execution/presto_cpp/main/QueryContextManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t>(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<uint32_t>(velox::common::CompressionKind_NONE));
configs[core::QueryConfig::kShuffleCompressionKind] =
velox::common::compressionKindToString(
velox::common::CompressionKind_NONE);
}
} else {
configs[sessionProperties_.toVeloxConfig(it.first)] = it.second;
Expand Down

0 comments on commit 1c216a1

Please sign in to comment.