-
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
Provide PlanBuilder convenience function #1578
Conversation
This pull request was exported from Phabricator. Differential Revision: D36303299 |
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.
Thanks for this change. Makes the code very clean.
velox/exec/tests/utils/PlanBuilder.h
Outdated
/// @param columnNames The columns to be returned from that table. | ||
PlanBuilder& tableScan( | ||
const std::shared_ptr<connector::tpch::TpchTableHandle>& tpchTableHandle, | ||
std::vector<std::string>&& columnNames); |
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.
Should the "columnNames" parameter be 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.
You mean const &? The intent here is to move it in to this this function since the ROW() function expects an rvalue ref (so we can avoid useless copies)
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.
Alright. Thanks.
@@ -321,6 +321,10 @@ RowTypePtr getTableSchema(Table table) { | |||
return nullptr; // make gcc happy. | |||
} | |||
|
|||
TypePtr resolveTpchColumn(Table table, const std::string& columnName) { |
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.
Is there a reason for not making "table" parameter 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.
Table is a enum (a single byte), so const ref is more expensive than passing by value.
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.
Sounds reasonable. Thanks.
Summary: Pull Request resolved: facebookincubator#1578 Add a PlanBuilder.tableScane helper function to reduce the amount of boilerplace when pulling data out of TPC-H connector. Reviewed By: kagamiori Differential Revision: D36303299 fbshipit-source-id: 854e1477092fca8b342b1c9971abfb7eeeb8a578
80a4e00
to
84434e0
Compare
This pull request was exported from Phabricator. Differential Revision: D36303299 |
Summary: Pull Request resolved: facebookincubator#1578 Add a PlanBuilder.tableScane helper function to reduce the amount of boilerplace when pulling data out of TPC-H connector. Reviewed By: kagamiori Differential Revision: D36303299 fbshipit-source-id: d5898559a94c97850a38711a90202caf24e8fca6
Summary: Pull Request resolved: facebookincubator#1578 Add a PlanBuilder.tableScane helper function to reduce the amount of boilerplace when pulling data out of TPC-H connector. Reviewed By: kagamiori Differential Revision: D36303299 fbshipit-source-id: d5898559a94c97850a38711a90202caf24e8fca6
Summary: Pull Request resolved: facebookincubator#1578 Add a PlanBuilder.tableScane helper function to reduce the amount of boilerplace when pulling data out of TPC-H connector. Reviewed By: kagamiori Differential Revision: D36303299 fbshipit-source-id: d5898559a94c97850a38711a90202caf24e8fca6
…en get attribute name (facebookincubator#1578)
Summary:
Add a PlanBuilder.tableScane helper function to reduce the amount of
boilerplace when pulling data out of TPC-H connector.
Differential Revision: D36303299