walterddr commented on code in PR #11882:
URL: https://github.com/apache/pinot/pull/11882#discussion_r1374786701
##########
pinot-query-planner/src/test/resources/queries/JoinPlans.json:
##########
@@ -421,6 +421,28 @@
"\n LogicalTableScan(table=[[b]])",
"\n"
]
+ },
+ {
+ "description": "nexted reused tmp table SEMI JOINs",
+ "sql": "EXPLAIN PLAN FOR WITH tmp1 AS ( SELECT * FROM a WHERE col2 NOT
IN ('foo', 'bar') ), tmp2 AS ( SELECT * FROM b WHERE col1 IN (SELECT col1 FROM
tmp1) AND col3 < 100 ) SELECT * FROM tmp2 WHERE col1 IN (SELECT col1 from tmp1
WHERE col3 > 10)",
+ "output": [
+ "Execution Plan",
+ "\nLogicalJoin(condition=[=($0, $7)], joinType=[semi])",
+ "\n PinotLogicalExchange(distribution=[hash[0]])",
+ "\n LogicalJoin(condition=[=($0, $7)], joinType=[semi])",
+ "\n LogicalFilter(condition=[<($2, 100)])",
+ "\n LogicalTableScan(table=[[b]])",
+ "\n PinotLogicalExchange(distribution=[broadcast],
relExchangeType=[PIPELINE_BREAKER])",
+ "\n LogicalProject(col1=[$0], col2=[$1])",
+ "\n LogicalFilter(condition=[AND(<>($1, 'bar'), <>($1,
'foo'))])",
+ "\n LogicalTableScan(table=[[a]])",
+ "\n PinotLogicalExchange(distribution=[hash[0]])",
+ "\n LogicalProject(col1=[$0], col3=[$2])",
+ "\n LogicalFilter(condition=[>($2, 10)])",
Review Comment:
this is a un-plannable sql before or after this bug fix PR. I would suggest
differ the fix into a different PR (i will change the test to make sure it
doesn't happen)
--
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]