Skip to content

Commit

Permalink
Delete createSerializer from the VectorSerde class
Browse files Browse the repository at this point in the history
Summary:
This was deprecated and replaced with createIterativeSerializer.

All known call sites have been updated (including in Presto).

Reviewed By: xiaoxmeng

Differential Revision: D54285206

fbshipit-source-id: 47034cd3f20c11374d7943e2ad29c952a7961a7b
  • Loading branch information
Kevin Wilfong authored and facebook-github-bot committed Feb 28, 2024
1 parent d581e87 commit 490aa4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
8 changes: 4 additions & 4 deletions velox/serializers/tests/PrestoSerializerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ class PrestoSerializerTest
auto concatenation = BaseVector::create(rowType, 0, pool_.get());
auto arena = std::make_unique<StreamArena>(pool_.get());
auto paramOptions = getParamSerdeOptions(serdeOptions);
auto serializer =
serde_->createSerializer(rowType, 10, arena.get(), &paramOptions);
auto serializer = serde_->createIterativeSerializer(
rowType, 10, arena.get(), &paramOptions);

for (const auto& vector : vectors) {
auto data = makeRowVector({"f"}, {vector});
Expand Down Expand Up @@ -1253,8 +1253,8 @@ TEST_F(PrestoSerializerTest, deserializeSingleColumn) {
auto arena = std::make_unique<StreamArena>(pool_.get());
auto rowType = asRowType(rowVector->type());
auto numRows = rowVector->size();
auto serializer =
serde_->createSerializer(rowType, numRows, arena.get(), nullptr);
auto serializer = serde_->createIterativeSerializer(
rowType, numRows, arena.get(), nullptr);
serializer->append(rowVector);
facebook::velox::serializer::presto::PrestoOutputStreamListener listener;
OStreamOutputStream out(&output, &listener);
Expand Down
12 changes: 0 additions & 12 deletions velox/vector/VectorStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,6 @@ class VectorSerde {
///
/// This is more appropriate if the use case involves many small writes, e.g.
/// partitioning a RowVector across multiple destinations.
///
/// TODO: Remove createSerializer once Presto is updated to call
/// createIterativeSerializer.
virtual std::unique_ptr<IterativeVectorSerializer> createSerializer(
RowTypePtr type,
int32_t numRows,
StreamArena* streamArena,
const Options* options = nullptr) {
return createIterativeSerializer(
std::move(type), numRows, streamArena, options);
}

virtual std::unique_ptr<IterativeVectorSerializer> createIterativeSerializer(
RowTypePtr type,
int32_t numRows,
Expand Down

0 comments on commit 490aa4c

Please sign in to comment.