xiangfu0 commented on code in PR #10535:
URL: https://github.com/apache/pinot/pull/10535#discussion_r1172077644


##########
pinot-query-planner/src/test/resources/queries/SetOpPlans.json:
##########
@@ -0,0 +1,95 @@
+{
+  "set_op_tests": {
+    "queries": [
+      {
+        "description": "UNION ALL from two tables",
+        "sql": "EXPLAIN PLAN FOR SELECT col1, col2 FROM a UNION ALL SELECT 
col1, col2 FROM b",
+        "output": [
+          "Execution Plan",
+          "\nLogicalUnion(all=[true])",
+          "\n  LogicalProject(col1=[$0], col2=[$1])",
+          "\n    LogicalTableScan(table=[[a]])",
+          "\n  LogicalProject(col1=[$0], col2=[$1])",
+          "\n    LogicalTableScan(table=[[b]])",
+          "\n"
+        ]
+      },
+      {
+        "description": "UNION ALL from three tables",
+        "sql": "EXPLAIN PLAN FOR SELECT col1, col2 FROM a UNION ALL SELECT 
col1, col2 FROM b UNION ALL SELECT col1, col2 FROM c",
+        "output": [
+          "Execution Plan",
+          "\nLogicalUnion(all=[true])",
+          "\n  LogicalUnion(all=[true])",
+          "\n    LogicalProject(col1=[$0], col2=[$1])",
+          "\n      LogicalTableScan(table=[[a]])",
+          "\n    LogicalProject(col1=[$0], col2=[$1])",
+          "\n      LogicalTableScan(table=[[b]])",
+          "\n  LogicalProject(col1=[$0], col2=[$1])",
+          "\n    LogicalTableScan(table=[[c]])",
+          "\n"
+        ]
+      },
+      {
+        "description": "UNION from three tables",
+        "sql": "EXPLAIN PLAN FOR SELECT col1, col2 FROM a UNION SELECT col1, 
col2 FROM b UNION SELECT col1, col2 FROM c",
+        "output": [
+          "Execution Plan",
+          "\nLogicalAggregate(group=[{0, 1}])",
+          "\n  LogicalExchange(distribution=[hash[0, 1]])",
+          "\n    LogicalAggregate(group=[{0, 1}])",
+          "\n      LogicalUnion(all=[true])",
+          "\n        LogicalUnion(all=[true])",
+          "\n          LogicalProject(col1=[$0], col2=[$1])",
+          "\n            LogicalTableScan(table=[[a]])",
+          "\n          LogicalProject(col1=[$0], col2=[$1])",
+          "\n            LogicalTableScan(table=[[b]])",
+          "\n        LogicalProject(col1=[$0], col2=[$1])",
+          "\n          LogicalTableScan(table=[[c]])",
+          "\n"
+        ]
+      },
+      {
+        "description": "INTERSECT from three tables",
+        "sql": "EXPLAIN PLAN FOR SELECT col1, col2 FROM a INTERSECT SELECT 
col1, col2 FROM b INTERSECT SELECT col1, col2 FROM c",

Review Comment:
   That was planned to be added in the next PR:
   
   
https://github.com/apache/pinot/pull/10622/files#diff-1216478b200657de2afb3b0c8552bda799e67b68049aa025dbefc037235d9fb0
   



-- 
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]

Reply via email to