You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "xiangfu0 (via GitHub)" <gi...@apache.org> on 2023/06/16 19:05:56 UTC

[GitHub] [pinot] xiangfu0 commented on a diff in pull request #10933: Fixing table name extraction for lateral join queries

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


##########
pinot-query-runtime/src/test/resources/queries/BasicQuery.json:
##########
@@ -61,6 +61,11 @@
       {
         "description": "Correlated subquery test",
         "sql": "SELECT {tbl1}.col1 FROM {tbl1} WHERE {tbl1}.col2 > (SELECT 0.5 * SUM({tbl2}.col3) FROM {tbl2} WHERE {tbl1}.col2 = {tbl1}.col2 AND {tbl1}.col1 = {tbl2}.col1)"
+      },
+      {
+        "description": "Lateral join query test",
+        "sql": "SELECT {tbl1}.col1, newb.sum_col3 FROM {tbl1} JOIN LATERAL (SELECT SUM(col3) as sum_col3 FROM {tbl2} WHERE col2 = {tbl1}.col2) AS newb ON TRUE",
+        "h2Sql": "SELECT {tbl1}.col1, newb.sum_col3 FROM {tbl1} JOIN (SELECT {tbl2}.col2, SUM({tbl2}.col3) AS sum_col3 FROM {tbl2} GROUP BY {tbl2}.col2) AS newb ON newb.col2 = {tbl1}.col2"

Review Comment:
   h2 doesn't support Lateral Join.



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org