Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 7c731ea

Browse files
author
GustavoAngulo
committed
Add access methods
1 parent b8d4b78 commit 7c731ea

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/include/optimizer/optimizer.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ class Optimizer : public AbstractOptimizer {
7373

7474
void Reset() override;
7575

76+
OptimizerMetadata &GetMetadata() { return metadata_; }
77+
78+
/* For test purposes only */
79+
std::shared_ptr<GroupExpression> TestInsertQueryTree(parser::SQLStatement *tree,
80+
concurrency::TransactionContext *txn) {
81+
return InsertQueryTree(tree, txn);
82+
}
83+
7684
private:
7785
/* HandleDDLStatement - Check and handle DDL statment (currently only support
7886
*CREATE), set

src/include/optimizer/rule.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ class RuleSet {
146146
return rewrite_rules_map_[static_cast<uint32_t>(set)];
147147
}
148148

149+
std::unordered_map<uint32_t, std::vector<std::unique_ptr<Rule>>> &GetRewriteRulesMap() { return rewrite_rules_map_; }
150+
151+
std::vector<std::unique_ptr<Rule>> &GetPredicatePushDownRules() { return predicate_push_down_rules_; }
152+
149153
private:
150154
std::vector<std::unique_ptr<Rule>> transformation_rules_;
151155
std::vector<std::unique_ptr<Rule>> implementation_rules_;

0 commit comments

Comments
 (0)