61yao commented on code in PR #9344:
URL: https://github.com/apache/pinot/pull/9344#discussion_r966414901
##########
pinot-query-planner/src/test/java/org/apache/pinot/query/QueryCompilationTest.java:
##########
@@ -148,6 +149,36 @@ public void testQueryProjectFilterPushDownForJoin() {
}
}
+ // Test that plan query can be run as multi-thread.
+ @Test
+ public void testPlanQueryMultiThread()
+ throws Exception {
+ Runnable planQuery = () -> {
+ String query = "SELECT a.col1, a.ts, b.col2, b.col3 FROM a JOIN b ON
a.col1 = b.col2 "
+ + "WHERE a.col3 >= 0 AND a.col2 IN ('a', 'b') AND b.col3 < 0";
+ QueryPlan queryPlan = _queryEnvironment.planQuery(query);
+ List<StageNode> intermediateStageRoots =
+ queryPlan.getStageMetadataMap().entrySet().stream().filter(e ->
e.getValue().getScannedTables().size() == 0)
+ .map(e ->
queryPlan.getQueryStageMap().get(e.getKey())).collect(Collectors.toList());
+ // Assert that no project of filter node for any intermediate stage
because all should've been pushed down.
+ for (StageNode roots : intermediateStageRoots) {
+ assertNodeTypeNotIn(roots, ImmutableList.of(ProjectNode.class,
FilterNode.class));
+ }
+ };
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]