-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter pushdown optimization. #947
Conversation
Unit testing passed. |
Unit testing passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clean code
Unit testing passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done
528440e
to
98185d9
Compare
Unit testing passed. |
98185d9
to
b0f8f37
Compare
Unit testing passed. |
1 similar comment
Unit testing passed. |
Unit testing failed. |
1 similar comment
Unit testing failed. |
eebf13d
to
756e0d7
Compare
Unit testing passed. |
1 similar comment
Unit testing passed. |
std::function<OptVariantType()> getEdgeRank; | ||
std::function<OptVariantType(const std::string&)> getInputProp; | ||
std::function<OptVariantType(const std::string&)> getVariableProp; | ||
std::function<OptVariantType(const std::string&, const std::string&)> getSrcTagProp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add some other interfaces like:
std::function<OptVariantType(TagID id, const std::string&)> getSrcTagProp
std::function<OptVariantType(EdgeType type, const std::string&)> getEdgeProp;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, your rewrite logic looks some bit weird.
Typically, the recursive program should looks like this:
Expression* rewrite(Expression* expr) {
switch (expr->type()) {
case kLogic:
auto* left = rewrite(expr->left());
auto* write = rewrite(expr->right());
return new LogicExpr(left, right);
case ...
}
}
wdyt?
f006197
to
100f736
Compare
Unit testing passed. |
Unit testing passed. |
3ca3801
to
6b5d026
Compare
Unit testing passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work!
6b5d026
to
9c93643
Compare
Unit testing passed. |
return buf; | ||
} | ||
|
||
OptVariantType AliasPropertyExpression::eval() const { | ||
return context_->getters().getAliasProp(*alias_, *prop_); | ||
OptVariantType AliasPropertyExpression::eval(Getters &getters) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using const
Unit testing passed. |
relate to #175 |
* Filter push down. * Rewrite and. * Add test. * Rewrite xor,or. * Not rewrite xor and add tests. * Add test. * Rebase and fix conflict. * Fix encode/decode for expression. * Make getters thread safe. * Fix get reserved prop in key. * Rebase and fix conflict. * Add gflags to tell if pushdown filter. * Address @dangleptr's comment. * Push down functions. * Test push down filter or not. * Add ut for testing push down function. Co-authored-by: dutor <440396+dutor@users.noreply.github.com>
Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com> Co-authored-by: panda-sheep <59197347+panda-sheep@users.noreply.github.com> Co-authored-by: Doodle <13706157+critical27@users.noreply.github.com>
The filter pushdown optimization is based on rewriting filter. Purpose of this pr is about to enhance the performance.