-
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
Replace tableScan API with tableScanBuilder #7769
Conversation
✅ Deploy Preview for meta-velox canceled.
|
@mbasmanova any thoughts on this change? Thanks. |
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.
@majetideepak Overall looks good. The new code is longer, but maybe it is easier to read. I have some questions.
velox/exec/tests/HashJoinTest.cpp
Outdated
auto op = PlanBuilder(planNodeIdGenerator, pool_.get()) | ||
.startTableScan() | ||
.outputType(scanOutputType) | ||
.tableHandle(makeTableHandle( |
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.
this can be simplified to makeTableHandle(), no?
velox/exec/tests/TableScanTest.cpp
Outdated
assignments) | ||
.startTableScan() | ||
.outputType(rowType) | ||
.tableHandle(makeTableHandle( |
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.
I wonder if this could be just
.remainingFilter("e.a is null")
velox/exec/tests/TableScanTest.cpp
Outdated
.outputType(ROW({{"d", BIGINT()}})) | ||
.tableHandle(makeTableHandle( | ||
SubfieldFilters{}, | ||
parseExpr("e.a is null or e.b is null", rowType))) |
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.
ditto
velox/exec/tests/TableScanTest.cpp
Outdated
.startTableScan() | ||
.outputType( | ||
outputColumn == kNoOutput ? ROW({"d"}, {BIGINT()}) : rowType) | ||
.tableHandle(makeTableHandle(SubfieldFilters{}, remainingFilter)) |
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.
ditto
velox/exec/tests/TableScanTest.cpp
Outdated
.tableScan(rowType, makeTableHandle(), assignments) | ||
.startTableScan() | ||
.outputType(rowType) | ||
.tableHandle(makeTableHandle()) |
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 this needed?
velox/exec/tests/TableScanTest.cpp
Outdated
.tableScan(ROW({}, {}), {"c1 <= 4000.1"}, "", dataColumns) | ||
.startTableScan() | ||
.outputType(ROW({}, {})) | ||
.subfieldFilters({"c1 <= 4000.1"}) |
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.
I wonder if it makes sense to allow specifying individual filters separately:
.subfieldFilters("a < 5")
.subfieldFilters("b is null")
velox/exec/tests/TableScanTest.cpp
Outdated
@@ -1725,7 +1828,7 @@ TEST_F(TableScanTest, statsBasedSkippingNulls) { | |||
|
|||
auto assertQuery = [&](const std::string& filter) { | |||
return TableScanTest::assertQuery( | |||
PlanBuilder().tableScan(rowType, {filter}).planNode(), | |||
PlanBuilder(pool_.get()).tableScan(rowType, {filter}).planNode(), |
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.
Why do we need to pass pool here?
velox/exec/tests/TableScanTest.cpp
Outdated
@@ -2477,7 +2625,7 @@ TEST_F(TableScanTest, remainingFilterSkippedStrides) { | |||
} | |||
createDuckDbTable(vectors); | |||
core::PlanNodeId tableScanNodeId; | |||
auto plan = PlanBuilder() | |||
auto plan = PlanBuilder(pool_.get()) |
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.
Why do we need to pass pool here?
70c9b7d
to
0d51fb4
Compare
0d51fb4
to
8451d92
Compare
@mbasmanova I addressed your comments. Can you make another pass? I removed most of the redundant |
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.
Nice. Thank you.
@mbasmanova has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@mbasmanova merged this pull request in fc0538d. |
Conbench analyzed the 1 benchmark run on commit There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
Summary: Remove the tableScan API that is less popular to keep the planBuilder API clean. Pull Request resolved: facebookincubator#7769 Reviewed By: xiaoxmeng Differential Revision: D51971797 Pulled By: mbasmanova fbshipit-source-id: 3f63f937a9371ec176213260d369d87d49ba1c51
Remove the tableScan API that is less popular to keep the planBuilder API clean.