Skip to content

Commit

Permalink
Remove ValueStream plan node and operator (oap-project#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchengchenghh authored and zhejiangxiaomai committed Jul 4, 2023
1 parent e1e657a commit f5be476
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 180 deletions.
8 changes: 0 additions & 8 deletions velox/core/PlanNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -653,14 +653,6 @@ void ArrowStreamNode::addDetails(std::stringstream& stream) const {
// Nothing to add.
}

const std::vector<PlanNodePtr>& ValueStreamNode::sources() const {
return kEmptySources;
}

void ValueStreamNode::addDetails(std::stringstream& stream) const {
// Nothing to add.
}

const std::vector<PlanNodePtr>& ExchangeNode::sources() const {
return kEmptySources;
}
Expand Down
38 changes: 0 additions & 38 deletions velox/core/PlanNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "velox/connectors/Connector.h"
#include "velox/core/Expressions.h"
#include "velox/core/QueryConfig.h"
#include "velox/vector/ComplexVectorStream.h"
#include "velox/vector/arrow/Bridge.h"

struct ArrowArrayStream;
Expand Down Expand Up @@ -261,43 +260,6 @@ class ValuesNode : public PlanNode {
const size_t repeatTimes_;
};

class ValueStreamNode : public PlanNode {
public:
ValueStreamNode(
const PlanNodeId& id,
const RowTypePtr& outputType,
std::shared_ptr<RowVectorStream> valueStream)
: PlanNode(id),
outputType_(outputType),
valueStream_(std::move(valueStream)) {
VELOX_CHECK_NOT_NULL(valueStream_);
}

const RowTypePtr& outputType() const override {
return outputType_;
}

const std::vector<PlanNodePtr>& sources() const override;

const std::shared_ptr<RowVectorStream>& rowVectorStream() const {
return valueStream_;
}

std::string_view name() const override {
return "ValueStream";
}

folly::dynamic serialize() const override {
VELOX_UNSUPPORTED("ValueStream plan node is not serializable");
}

private:
void addDetails(std::stringstream& stream) const override;

const RowTypePtr outputType_;
std::shared_ptr<RowVectorStream> valueStream_;
};

class ArrowStreamNode : public PlanNode {
public:
ArrowStreamNode(
Expand Down
1 change: 0 additions & 1 deletion velox/exec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ add_library(
TopNRowNumber.cpp
Unnest.cpp
Values.cpp
ValueStream.cpp
VectorHasher.cpp
Window.cpp
WindowFunction.cpp
Expand Down
9 changes: 0 additions & 9 deletions velox/exec/LocalPlanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include "velox/exec/TopN.h"
#include "velox/exec/TopNRowNumber.h"
#include "velox/exec/Unnest.h"
#include "velox/exec/ValueStream.h"
#include "velox/exec/Values.h"
#include "velox/exec/Window.h"

Expand Down Expand Up @@ -188,9 +187,6 @@ uint32_t maxDrivers(const DriverFactory& driverFactory) {
if (!values->isParallelizable()) {
return 1;
}
} else if (std::dynamic_pointer_cast<const core::ValueStreamNode>(node)) {
// ValueStream node must run single-threaded.
return 1;
} else if (std::dynamic_pointer_cast<const core::ArrowStreamNode>(node)) {
// ArrowStream node must run single-threaded.
return 1;
Expand Down Expand Up @@ -407,11 +403,6 @@ std::shared_ptr<Driver> DriverFactory::createDriver(
auto valuesNode =
std::dynamic_pointer_cast<const core::ValuesNode>(planNode)) {
operators.push_back(std::make_unique<Values>(id, ctx.get(), valuesNode));
} else if (
auto valueStreamNode =
std::dynamic_pointer_cast<const core::ValueStreamNode>(planNode)) {
operators.push_back(
std::make_unique<ValueStream>(id, ctx.get(), valueStreamNode));
} else if (
auto arrowStreamNode =
std::dynamic_pointer_cast<const core::ArrowStreamNode>(planNode)) {
Expand Down
49 changes: 0 additions & 49 deletions velox/exec/ValueStream.cpp

This file was deleted.

41 changes: 0 additions & 41 deletions velox/exec/ValueStream.h

This file was deleted.

34 changes: 0 additions & 34 deletions velox/vector/ComplexVectorStream.h

This file was deleted.

0 comments on commit f5be476

Please sign in to comment.