This repository has been archived by the owner on Sep 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 623
Syntax-Based Query Rewriter, Code Review #2 #1495
Open
esargent28
wants to merge
16
commits into
cmu-db:master
Choose a base branch
from
17zhangw:equiv-experimental
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Commits on Apr 1, 2019
-
Templatized some of the core files:
- pattern - rule - ruleset - group - groupexpression - binding - memo - optimize_context - optimizer_task (TopDownRewrite/BottomUpRewrite) Templates generally followed: template <class Node, class OperatorType, class OperatorExpr> The template instantiation associated with: Node = Operator, OperatorType = OpType, OperatorExpr = OperatorExpression is used primarily by the core Optimizer. All references to the templated files/classes from core optimizer files were instantiated to that. Note worth mentioning: Operator class defines a public interface wrapper around BaseOperatorNode, basically defines a single logical/physical operator. OpType class defines the various logical/physical operations OperatorExpression class is essentially a tree of Operator
Configuration menu - View commit details
-
Copy full SHA for dec8194 - Browse repository at this point
Copy the full SHA dec8194View commit details -
Enabled rewriting of a single rule (constant = constant), check tests.
Possibly annoying problems w.r.t Peloton/terrier: (1) Use of unique_ptr/raw pointer as opposed to shared_ptr in AbstractExpression (2) AbstractExpression equality comparison method Additional components needed: - Dynamic/template/strategy rule evaluation (particularly comparison) - Repeated/multi-level application of rules - Layer to convert from memo -> AbstractExpression - Some refactoring w.r.t templated code - Better AbsExpr_Container/Expression indirection layer (intended to present a similar interface exposed by Operator/OperatorExpression relied upon by core logic) - Proper memory management strategy (tightly coupled to problem #1)
Configuration menu - View commit details
-
Copy full SHA for 1be43be - Browse repository at this point
Copy the full SHA 1be43beView commit details
Commits on Apr 5, 2019
-
Refactoring + full tree rebuilding (at least 2 levels work)
What still doesn't work/don't care about yet/not done - proper memory management (terrier uses shared_ptr anyways) - other 1-level rewrites, multi-layer rewrites, other expr rewrites - how can we define a grammar to programmatically create these rewrites? (the one we have is way too static...) - in relation to logical equivalence: (1) how do we generate logically equivalent expressions: - multi-pass using generating rules (similar to ApplyRule) OR - from Pattern A, generate logically equivalent set of patterns P OR - transform input expression to match certain specification OR - ??? (2) what operators do we support translating? - probably (a AND b) ====> (b AND a) - probably (a OR b) ====> (b OR a) - probably (a = b) ====> (b = a) - maybe more??? (3) do we want multi level translations? - i.e (a AND b) AND c ====> (a AND (b AND c)) - what order do we do these in? May have to modify these operations: - Some assertions in TopDownRewrite/BottomUpRewrite w.r.t to the iterator - Possibly binding.cpp / optimizer_metadata.h / optimizer_task.cpp Issues still pending: - Comparing Values (Matt email/discussion) - r.rule->Check (terrier issue cmu-db#332)
Configuration menu - View commit details
-
Copy full SHA for f4d4e8f - Browse repository at this point
Copy the full SHA f4d4e8fView commit details
Commits on Apr 7, 2019
-
AbstractNode will provide interface for Operator and eventually AbstractExpressions as well. Note there are a few road blocks before the rest of the rewriter can be changed to cleanly use abstract classes: (1) Similarly abstract OperatorExpressions. (2) We will have to find a good place to hide OpType, which is currently an enum type (cannot be abstracted) and pervades the code base. This may be solved by abstracting at the group level, but will have to look into it. (3) Need to clean up and separate interfaces between AbstractNode, OperatorNode, and Operator classes.
Configuration menu - View commit details
-
Copy full SHA for 209c46a - Browse repository at this point
Copy the full SHA 209c46aView commit details
Commits on Apr 26, 2019
-
Using AbstractNode throughout optimizer.
Abstract nodes were implemented in 209c46a. This is essentially just refactoring and plugging in abstract nodes throughout the optimizer. The abstract interface exposes OpType and ExpressionType for now, which ideally will be fixed later. Work remaining for abstracting OperatorExpression.
Configuration menu - View commit details
-
Copy full SHA for 17de3b9 - Browse repository at this point
Copy the full SHA 17de3b9View commit details
Commits on Apr 30, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 3266f29 - Browse repository at this point
Copy the full SHA 3266f29View commit details
Commits on May 5, 2019
-
Merge branch 'templatize' into abstract.
Still need to make fixes to Pattern to support both OpType and ExpType without templatizing. Will also need to clean up code after before build will work.
Configuration menu - View commit details
-
Copy full SHA for 721323c - Browse repository at this point
Copy the full SHA 721323cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5caae6d - Browse repository at this point
Copy the full SHA 5caae6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e3ac1ba - Browse repository at this point
Copy the full SHA e3ac1baView commit details
Commits on May 14, 2019
-
Added documentation on rule_rewrite.h
Erik Sargent committedMay 14, 2019 Configuration menu - View commit details
-
Copy full SHA for 4984dbf - Browse repository at this point
Copy the full SHA 4984dbfView commit details -
Switched order of include expressions in abstract_node_expression.h
Erik Sargent committedMay 14, 2019 Configuration menu - View commit details
-
Copy full SHA for 787cdfd - Browse repository at this point
Copy the full SHA 787cdfdView commit details -
Swapped order of #includes in abstract_node_expression.h
Erik Sargent committedMay 14, 2019 Configuration menu - View commit details
-
Copy full SHA for 23a7fbf - Browse repository at this point
Copy the full SHA 23a7fbfView commit details -
Configuration menu - View commit details
-
Copy full SHA for da839e8 - Browse repository at this point
Copy the full SHA da839e8View commit details
Commits on May 15, 2019
-
Configuration menu - View commit details
-
Copy full SHA for a0315c3 - Browse repository at this point
Copy the full SHA a0315c3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 010407b - Browse repository at this point
Copy the full SHA 010407bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d9bdd1 - Browse repository at this point
Copy the full SHA 1d9bdd1View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.