Jackie-Jiang commented on code in PR #10819:
URL: https://github.com/apache/pinot/pull/10819#discussion_r1211133440


##########
pinot-query-runtime/src/test/resources/queries/NullHandling.json:
##########
@@ -45,6 +45,16 @@
       {
         "description": "LEFT JOIN and GROUP BY with AGGREGATE",
         "sql": "SELECT {tbl1}.strCol2, COUNT({tbl2}.intCol1), 
MIN({tbl2}.intCol1), MAX({tbl2}.doubleCol1), SUM({tbl2}.doubleCol1) FROM {tbl1} 
LEFT OUTER JOIN {tbl2} ON {tbl1}.strCol1 = {tbl2}.strCol1 GROUP BY 
{tbl1}.strCol2"
+      },
+      {
+        "description": "LEFT JOIN and SORT (by default, H2 treats null as the 
smallest value, which is different from Postgres, thus we don't test the 
default ordering)",
+        "sql": "SELECT {tbl2}.doubleCol1 AS col FROM {tbl1} LEFT OUTER JOIN 
{tbl2} ON {tbl1}.strCol1 = {tbl2}.strCol1 ORDER BY col NULLS FIRST",
+        "keepOutputRowOrder": true
+      },
+      {
+        "description": "LEFT JOIN and GROUP BY with AGGREGATE AND SORT",
+        "sql": "SELECT {tbl1}.strCol2, COUNT({tbl2}.intCol1), 
MIN({tbl2}.intCol1) AS minCol, MAX({tbl2}.doubleCol1), SUM({tbl2}.doubleCol1) 
FROM {tbl1} LEFT OUTER JOIN {tbl2} ON {tbl1}.strCol1 = {tbl2}.strCol1 GROUP BY 
{tbl1}.strCol2 ORDER BY minCol DESC NULLS LAST",
+        "keepOutputRowOrder": true

Review Comment:
   One problem with LEFT JOIN is that values are either all null or all not 
null, so it is kind of hard to verify the behavior. Added the test into the 
`SortOperatorTest`



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