Skip to content

Commit

Permalink
[native]Advance velox version
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxmeng authored and tanjialiang committed Aug 15, 2024
1 parent 0d0c2ea commit be29974
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ class BroadcastTest : public exec::test::OperatorTestBase {
ranges.emplace_back(ByteRange{
const_cast<uint8_t*>(range.data()), (int32_t)range.size(), 0});
}
ByteInputStream byteStream(std::move(ranges));
auto byteStream = std::make_unique<BufferInputStream>(std::move(ranges));

RowVectorPtr result;
VectorStreamGroup::read(&byteStream, pool(), dataType, &result);
VectorStreamGroup::read(byteStream.get(), pool(), dataType, &result);
return result;
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ class Producer {
std::string toString(exec::SerializedPage* page) {
auto input = page->prepareStreamForDeserialize();

auto numBytes = input.read<int32_t>();
auto numBytes = input->read<int32_t>();
char data[numBytes + 1];
input.readBytes(data, numBytes);
input->readBytes(data, numBytes);
data[numBytes] = '\0';
return std::string(data);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ class Cursor {
const_cast<uint8_t*>(range.data()), (int32_t)range.size(), 0});
}

ByteInputStream input(std::move(byteRanges));
auto input = std::make_unique<BufferInputStream>(std::move(byteRanges));

std::vector<RowVectorPtr> 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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
using namespace facebook::velox;
namespace facebook::presto::protocol {
namespace {
ByteInputStream toByteStream(const std::string& input) {
std::unique_ptr<ByteInputStream> toByteStream(const std::string& input) {
ByteRange byteRange{
reinterpret_cast<uint8_t*>(const_cast<char*>(input.data())),
(int32_t)input.length(),
0};
return ByteInputStream({byteRange});
return std::make_unique<BufferInputStream>(std::vector<ByteRange>{byteRange});
}
} // namespace

Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion presto-native-execution/velox
Submodule velox updated 63 files
+2 −1 velox/common/base/SpillStats.cpp
+1 −0 velox/common/base/SpillStats.h
+7 −2 velox/common/file/CMakeLists.txt
+257 −0 velox/common/file/FileInputStream.cpp
+130 −0 velox/common/file/FileInputStream.h
+0 −1 velox/common/file/Utils.cpp
+0 −1 velox/common/file/Utils.h
+3 −1 velox/common/file/tests/CMakeLists.txt
+115 −0 velox/common/file/tests/FileInputStreamTest.cpp
+49 −48 velox/common/memory/ByteStream.cpp
+283 −29 velox/common/memory/ByteStream.h
+3 −3 velox/common/memory/HashStringAllocator.cpp
+1 −1 velox/common/memory/HashStringAllocator.h
+267 −87 velox/common/memory/tests/ByteStreamTest.cpp
+12 −12 velox/common/memory/tests/HashStringAllocatorTest.cpp
+0 −6 velox/connectors/Connector.h
+0 −12 velox/connectors/fuzzer/FuzzerConnector.h
+0 −11 velox/connectors/hive/HiveConnector.h
+0 −7 velox/connectors/tests/ConnectorTest.cpp
+0 −12 velox/connectors/tpch/TpchConnector.h
+0 −7 velox/core/CMakeLists.txt
+0 −58 velox/core/Config.cpp
+0 −141 velox/core/Config.h
+1 −2 velox/core/QueryConfig.h
+0 −29 velox/core/QueryCtx.cpp
+0 −11 velox/core/QueryCtx.h
+6 −5 velox/exec/AddressableNonNullValueList.cpp
+7 −2 velox/exec/Exchange.cpp
+6 −0 velox/exec/ExchangeQueue.cpp
+10 −6 velox/exec/ExchangeQueue.h
+19 −14 velox/exec/MergeJoin.cpp
+4 −4 velox/exec/MergeSource.cpp
+9 −7 velox/exec/RowContainer.cpp
+4 −2 velox/exec/RowContainer.h
+1 −1 velox/exec/SortedAggregations.cpp
+23 −1 velox/exec/SpillFile.cpp
+12 −0 velox/exec/SpillFile.h
+3 −3 velox/exec/fuzzer/PrestoQueryRunner.cpp
+1 −0 velox/exec/fuzzer/ReferenceQueryRunner.h
+29 −13 velox/exec/fuzzer/WindowFuzzer.cpp
+4 −1 velox/exec/fuzzer/WindowFuzzer.h
+0 −11 velox/exec/tests/AsyncConnectorTest.cpp
+9 −8 velox/exec/tests/ContainerRowSerdeTest.cpp
+1 −1 velox/exec/tests/HashJoinTest.cpp
+32 −0 velox/exec/tests/MergeJoinTest.cpp
+4 −6 velox/exec/tests/SpillerTest.cpp
+2 −2 velox/exec/tests/TableScanTest.cpp
+2 −2 velox/exec/tests/TaskTest.cpp
+1 −1 velox/exec/tests/ThreadDebugInfoTest.cpp
+1 −1 velox/exec/tests/utils/ArbitratorTestUtil.cpp
+2 −1 velox/exec/tests/utils/AssertQueryBuilder.cpp
+2 −1 velox/exec/tests/utils/Cursor.cpp
+2 −2 velox/functions/lib/aggregates/SingleValueAccumulator.cpp
+2 −2 velox/functions/lib/aggregates/ValueList.cpp
+2 −2 velox/functions/lib/aggregates/ValueList.h
+1 −1 velox/functions/lib/aggregates/ValueSet.cpp
+1 −1 velox/row/benchmark/UnsafeRowSerializeBenchmark.cpp
+3 −3 velox/serializers/PrestoSerializer.cpp
+3 −3 velox/serializers/tests/CompactRowSerializerTest.cpp
+35 −14 velox/serializers/tests/PrestoSerializerTest.cpp
+5 −4 velox/serializers/tests/UnsafeRowSerializerTest.cpp
+3 −2 velox/vector/VectorStream.cpp
+4 −4 velox/vector/tests/VectorTest.cpp

0 comments on commit be29974

Please sign in to comment.