Skip to content

Commit

Permalink
Plan convert init part (facebookincubator#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdinand Xu authored Sep 14, 2021
1 parent 0693430 commit 1eff92b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
26 changes: 26 additions & 0 deletions velox/core/PlanNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,32 @@ class LimitNode : public PlanNode {
const std::vector<std::shared_ptr<const PlanNode>> sources_;
};

class JITedNode : public PlanNode {
public:
JITedNode(
const PlanNodeId& id,
const std::string jit_plan_str,
const std::shared_ptr<const PlanNode>& source)
: PlanNode(id), jit_plan_str_(jit_plan_str), sources_{source} {};

// TODO (Cheng) change to the right output types
const RowTypePtr& outputType() const override {
return sources_[0]->outputType();
}

const std::vector<std::shared_ptr<const PlanNode>>& sources() const override {
return sources_;
}

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

private:
const std::string jit_plan_str_;
const std::vector<std::shared_ptr<const PlanNode>> sources_;
};

/// Expands arrays and maps into separate columns. Arrays are expanded into a
/// single column, and maps are expanded into two columns (key, value). Can be
/// used to expand multiple columns. In this case will produce as many rows as
Expand Down
6 changes: 6 additions & 0 deletions velox/core/QueryCtx.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ class QueryCtx : public Context {
static constexpr const char* kCodegenLazyLoading =
"driver.codegen.lazy_loading";

// Configuration to enable JITed engine and JIT backend
static constexpr const char* kJITEnabled = "driver.jit.enabled";
static constexpr const char* kJITBackend =
"driver.codegen.configuration_file_path";


// User provided session timezone. Stores a string with the actual timezone
// name, e.g: "America/Los_Angeles".
static constexpr const char* kSessionTimezone = "driver.session.timezone";
Expand Down

0 comments on commit 1eff92b

Please sign in to comment.