-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Local dynamic filter support for Iceberg #9538
Conversation
...iceberg/src/test/java/io/trino/plugin/iceberg/AbstractTestIcebergDistributedJoinQueries.java
Outdated
Show resolved
Hide resolved
...iceberg/src/test/java/io/trino/plugin/iceberg/AbstractTestIcebergDistributedJoinQueries.java
Outdated
Show resolved
Hide resolved
testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueryFramework.java
Outdated
Show resolved
Hide resolved
testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueryFramework.java
Outdated
Show resolved
Hide resolved
...rino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergDistributedJoinQueriesOrc.java
Outdated
Show resolved
Hide resolved
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.
LGTM % ensuring test determinism.
...rino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergDistributedJoinQueriesOrc.java
Outdated
Show resolved
Hide resolved
...iceberg/src/test/java/io/trino/plugin/iceberg/AbstractTestIcebergDistributedJoinQueries.java
Outdated
Show resolved
Hide resolved
...iceberg/src/test/java/io/trino/plugin/iceberg/AbstractTestIcebergDistributedJoinQueries.java
Outdated
Show resolved
Hide resolved
...iceberg/src/test/java/io/trino/plugin/iceberg/AbstractTestIcebergDistributedJoinQueries.java
Outdated
Show resolved
Hide resolved
...-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergDistributedJoinQueriesParquet.java
Outdated
Show resolved
Hide resolved
testing/trino-testing/src/main/java/io/trino/testing/AbstractTestQueryFramework.java
Outdated
Show resolved
Hide resolved
timeout); | ||
} | ||
|
||
protected void assertQueryStats( |
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.
We could consider adding another method dedicated for operator stats assertions
protected void assertOperatorStats(
Session session,
@Language("SQL") String query,
Predicate<PlanNode> planNodeMatcher,
Consumer<List<OperatorStats>> operatorStatsAssertion,
Consumer<MaterializedResult> resultAssertion,
Duration timeout)
{
// TODO: replace this with a simple operator stats check once we find a way to wait until all pending updates to query stats have been applied
// (might be fixed by https://github.com/trinodb/trino/issues/5172)
assertEventually(timeout, () -> {
DistributedQueryRunner queryRunner = getDistributedQueryRunner();
ResultWithQueryId<MaterializedResult> resultWithQueryId = queryRunner.executeWithQueryId(session, query);
QueryId queryId = resultWithQueryId.getQueryId();
Plan plan = getDistributedQueryRunner().getQueryPlan(queryId);
PlanNodeId nodeId = PlanNodeSearcher.searchFrom(plan.getRoot())
.where(planNodeMatcher)
.findOnlyElement()
.getId();
List<OperatorStats> operatorStats = getDistributedQueryRunner().getCoordinator()
.getQueryManager()
.getFullQueryInfo(queryId)
.getQueryStats()
.getOperatorSummaries()
.stream()
.filter(summary -> nodeId.equals(summary.getPlanNodeId()))
.collect(toImmutableList());
operatorStatsAssertion.accept(operatorStats);
resultAssertion.accept(resultWithQueryId.getResult());
});
}
0920c40
to
207f2f1
Compare
Moved the test into
It's already a |
query runner factory can provision tables from sf1 only, but the test can 'manually' use any scale factor we want (within reasonable execution time limits). |
@alexjo2144 see ci |
207f2f1
to
ddfe0a5
Compare
Thanks @findepi, I forgot I turned off auto-optimize imports. Fixed |
@@ -395,6 +396,21 @@ protected void assertQueryStats( | |||
Consumer<QueryStats> queryStatsAssertion, | |||
Consumer<MaterializedResult> resultAssertion, | |||
Duration timeout) | |||
{ |
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.
typo in cmt msg
Suppert assertQueryStats assertions that use queryId
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.
however, drop this commit, see comment in next
(statistics, queryId) -> { | ||
OperatorStats probeStats = searchScanFilterAndProjectOperatorStats( | ||
queryId, |
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 use queryId
, but you don't use statistics
this looks like abuse of assertQueryStats
let's use executeWithQueryId
+ searchScanFilterAndProjectOperatorStats
directly
let's wrap in assertEventually
, linking to #5172
7a0764a
to
98e1104
Compare
Issue: #4115
An original PR with the same changes: #5719
I think this should wait for #9193 since the tests are fairly flaky right now, relying on the left side of the join happening fast enough for the DF to be useful. Once that PR is merged we could add a DF wait time.