From be299743bf1b2feaaf0fbfaa3d09ce052908a22b Mon Sep 17 00:00:00 2001 From: xiaoxmeng Date: Wed, 14 Aug 2024 23:37:53 -0700 Subject: [PATCH] [native]Advance velox version --- .../presto_cpp/main/operators/tests/BroadcastTest.cpp | 4 ++-- .../presto_cpp/main/tests/PrestoExchangeSourceTest.cpp | 4 ++-- .../presto_cpp/main/tests/TaskManagerTest.cpp | 6 +++--- .../presto_cpp/presto_protocol/Base64Util.cpp | 6 +++--- presto-native-execution/velox | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/presto-native-execution/presto_cpp/main/operators/tests/BroadcastTest.cpp b/presto-native-execution/presto_cpp/main/operators/tests/BroadcastTest.cpp index b87562df03ab..f9cb9d94a8bf 100644 --- a/presto-native-execution/presto_cpp/main/operators/tests/BroadcastTest.cpp +++ b/presto-native-execution/presto_cpp/main/operators/tests/BroadcastTest.cpp @@ -208,10 +208,10 @@ class BroadcastTest : public exec::test::OperatorTestBase { ranges.emplace_back(ByteRange{ const_cast(range.data()), (int32_t)range.size(), 0}); } - ByteInputStream byteStream(std::move(ranges)); + auto byteStream = std::make_unique(std::move(ranges)); RowVectorPtr result; - VectorStreamGroup::read(&byteStream, pool(), dataType, &result); + VectorStreamGroup::read(byteStream.get(), pool(), dataType, &result); return result; } }; diff --git a/presto-native-execution/presto_cpp/main/tests/PrestoExchangeSourceTest.cpp b/presto-native-execution/presto_cpp/main/tests/PrestoExchangeSourceTest.cpp index 77affdbffbcd..9c9af78e87c5 100644 --- a/presto-native-execution/presto_cpp/main/tests/PrestoExchangeSourceTest.cpp +++ b/presto-native-execution/presto_cpp/main/tests/PrestoExchangeSourceTest.cpp @@ -311,9 +311,9 @@ class Producer { std::string toString(exec::SerializedPage* page) { auto input = page->prepareStreamForDeserialize(); - auto numBytes = input.read(); + auto numBytes = input->read(); char data[numBytes + 1]; - input.readBytes(data, numBytes); + input->readBytes(data, numBytes); data[numBytes] = '\0'; return std::string(data); } diff --git a/presto-native-execution/presto_cpp/main/tests/TaskManagerTest.cpp b/presto-native-execution/presto_cpp/main/tests/TaskManagerTest.cpp index aca15b867e83..d940fb033f35 100644 --- a/presto-native-execution/presto_cpp/main/tests/TaskManagerTest.cpp +++ b/presto-native-execution/presto_cpp/main/tests/TaskManagerTest.cpp @@ -153,12 +153,12 @@ class Cursor { const_cast(range.data()), (int32_t)range.size(), 0}); } - ByteInputStream input(std::move(byteRanges)); + auto input = std::make_unique(std::move(byteRanges)); std::vector vectors; - while (!input.atEnd()) { + while (!input->atEnd()) { RowVectorPtr vector; - VectorStreamGroup::read(&input, pool_, rowType_, &vector); + VectorStreamGroup::read(input.get(), pool_, rowType_, &vector); vectors.emplace_back(vector); } return vectors; diff --git a/presto-native-execution/presto_cpp/presto_protocol/Base64Util.cpp b/presto-native-execution/presto_cpp/presto_protocol/Base64Util.cpp index ddee984f44b7..4dbaa20d3ec2 100644 --- a/presto-native-execution/presto_cpp/presto_protocol/Base64Util.cpp +++ b/presto-native-execution/presto_cpp/presto_protocol/Base64Util.cpp @@ -19,12 +19,12 @@ using namespace facebook::velox; namespace facebook::presto::protocol { namespace { -ByteInputStream toByteStream(const std::string& input) { +std::unique_ptr toByteStream(const std::string& input) { ByteRange byteRange{ reinterpret_cast(const_cast(input.data())), (int32_t)input.length(), 0}; - return ByteInputStream({byteRange}); + return std::make_unique(std::vector{byteRange}); } } // namespace @@ -37,7 +37,7 @@ velox::VectorPtr readBlock( auto byteStream = toByteStream(data); VectorPtr result; serializer::presto::PrestoVectorSerde serde; - serde.deserializeSingleColumn(&byteStream, pool, type, &result, nullptr); + serde.deserializeSingleColumn(byteStream.get(), pool, type, &result, nullptr); return result; } diff --git a/presto-native-execution/velox b/presto-native-execution/velox index 3ef1d611bdbb..9523840ac329 160000 --- a/presto-native-execution/velox +++ b/presto-native-execution/velox @@ -1 +1 @@ -Subproject commit 3ef1d611bdbb672067671d788899c354d64ed409 +Subproject commit 9523840ac329be4f7318338fb92cb92bcb0a8c07