17 #ifndef QUERYENGINE_RELALGVISITOR_H
18 #define QUERYENGINE_RELALGVISITOR_H
27 for (
size_t i = 0; i < rel_alg->
inputCount(); ++i) {
30 const auto aggregate =
dynamic_cast<const RelAggregate*
>(rel_alg);
34 const auto compound =
dynamic_cast<const RelCompound*
>(rel_alg);
38 const auto filter =
dynamic_cast<const RelFilter*
>(rel_alg);
42 const auto join =
dynamic_cast<const RelJoin*
>(rel_alg);
47 if (left_deep_inner_join) {
50 const auto project =
dynamic_cast<const RelProject*
>(rel_alg);
54 const auto scan =
dynamic_cast<const RelScan*
>(rel_alg);
58 const auto sort =
dynamic_cast<const RelSort*
>(rel_alg);
66 const auto modify =
dynamic_cast<const RelModify*
>(rel_alg);
74 const auto logical_union =
dynamic_cast<const RelLogicalUnion*
>(rel_alg);
78 LOG(
FATAL) <<
"Unhandled rel_alg type: "
117 #endif // QUERYENGINE_RELALGVISITOR_H
virtual T visitCompound(const RelCompound *) const
virtual T visitTableFunction(const RelTableFunction *) const
virtual T visitJoin(const RelJoin *) const
DEVICE void sort(ARGS &&...args)
virtual T visitFilter(const RelFilter *) const
virtual T visitLogicalUnion(const RelLogicalUnion *) const
virtual T visitAggregate(const RelAggregate *) const
T visit(const RelAlgNode *rel_alg) const
const RelAlgNode * getInput(const size_t idx) const
virtual T visitSort(const RelSort *) const
virtual T visitModify(const RelModify *) const
virtual std::string toString(RelRexToStringConfig config=RelRexToStringConfig::defaults()) const =0
virtual T visitProject(const RelProject *) const
virtual T visitLogicalValues(const RelLogicalValues *) const
static RelRexToStringConfig defaults()
virtual T visitLeftDeepInnerJoin(const RelLeftDeepInnerJoin *) const
virtual T defaultResult() const
virtual T visitScan(const RelScan *) const
const size_t inputCount() const
virtual T aggregateResult(const T &aggregate, const T &next_result) const