Class QueryRewriter

class QueryRewriter

Public Functions

QueryRewriter(const std::vector<InputTableInfo> &query_infos, Executor *executor)
RelAlgExecutionUnit rewrite(const RelAlgExecutionUnit &ra_exe_unit_in) const
RelAlgExecutionUnit rewriteColumnarUpdate(const RelAlgExecutionUnit &ra_exe_unit_in, std::shared_ptr<Analyzer::Expr> column_to_update) const
RelAlgExecutionUnit rewriteColumnarDelete(const RelAlgExecutionUnit &ra_exe_unit_in, std::shared_ptr<Analyzer::ColumnVar> delete_column) const
RelAlgExecutionUnit rewriteAggregateOnGroupByColumn(const RelAlgExecutionUnit &ra_exe_unit_in) const

Private Functions

RelAlgExecutionUnit rewriteOverlapsJoin(const RelAlgExecutionUnit &ra_exe_unit_in) const
RelAlgExecutionUnit rewriteConstrainedByIn(const RelAlgExecutionUnit &ra_exe_unit_in) const
RelAlgExecutionUnit rewriteConstrainedByInImpl(const RelAlgExecutionUnit &ra_exe_unit_in, const std::shared_ptr<Analyzer::CaseExpr> case_expr, const Analyzer::InValues *in_vals) const
std::pair<bool, std::set<size_t>> is_all_groupby_exprs_are_col_var(const std::list<std::shared_ptr<Analyzer::Expr>> &groupby_exprs) const
std::shared_ptr<Analyzer::CaseExpr> generateCaseExprForCountDistinctOnGroupByCol(std::shared_ptr<Analyzer::Expr> expr) const

Private Members

const std::vector<InputTableInfo> &query_infos_
Executor *executor_
std::vector<std::shared_ptr<Analyzer::Expr>> target_exprs_owned_

Private Static Functions

std::shared_ptr<Analyzer::CaseExpr> generateCaseForDomainValues(const Analyzer::InValues *in_vals)