Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert D61338045: [presto][diff_train] [native]Advance velox version #23932

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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});
}
auto byteStream = std::make_unique<BufferInputStream>(std::move(ranges));
ByteInputStream byteStream(std::move(ranges));

RowVectorPtr result;
VectorStreamGroup::read(byteStream.get(), pool(), dataType, &result);
VectorStreamGroup::read(&byteStream, 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 @@ -156,12 +156,12 @@ class Cursor {
const_cast<uint8_t*>(range.data()), (int32_t)range.size(), 0});
}

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

std::vector<RowVectorPtr> vectors;
while (!input->atEnd()) {
while (!input.atEnd()) {
RowVectorPtr vector;
VectorStreamGroup::read(input.get(), pool_, rowType_, &vector);
VectorStreamGroup::read(&input, 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 {
std::unique_ptr<ByteInputStream> toByteStream(const std::string& input) {
ByteInputStream toByteStream(const std::string& input) {
ByteRange byteRange{
reinterpret_cast<uint8_t*>(const_cast<char*>(input.data())),
(int32_t)input.length(),
0};
return std::make_unique<BufferInputStream>(std::vector<ByteRange>{byteRange});
return ByteInputStream({byteRange});
}
} // namespace

Expand All @@ -37,7 +37,7 @@ velox::VectorPtr readBlock(
auto byteStream = toByteStream(data);
VectorPtr result;
serializer::presto::PrestoVectorSerde serde;
serde.deserializeSingleColumn(byteStream.get(), pool, type, &result, nullptr);
serde.deserializeSingleColumn(&byteStream, pool, type, &result, nullptr);
return result;
}

Expand Down
Loading