suneet-s commented on a change in pull request #8719: GREATEST/LEAST 
post-aggregators in SQL
URL: https://github.com/apache/druid/pull/8719#discussion_r373880596
 
 

 ##########
 File path: sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java
 ##########
 @@ -5112,6 +5117,154 @@ public void testMinMaxAvgDailyCountWithLimit() throws 
Exception
     );
   }
 
+  @Test
+  public void testGreatestLongAndDouble() throws Exception
+  {
+    // Cannot vectorize due to virtual columns.
+    cannotVectorize();
+
+    testQuery(
+        "SELECT * FROM ("
+        + "  SELECT greatest(cntl1, cntl2), greatest(cntd1, cntd2) FROM (\n"
+        + "      SELECT TIME_FLOOR(__time, 'P1D') AS t,\n"
+        + "          count(1) AS cntl1, 10 AS cntl2,\n"
+        + "          (1.2 + count(1)) AS cntd1, 10.2 AS cntd2\n"
+        + "      FROM \"foo\"\n"
+        + "      GROUP BY 1\n"
+        + "  )"
+        + ")\n",
 
 Review comment:
   Some more tests for greatest, least would be good here.
   
   * GREATEST/ LEAST on a single column, expression, literal, (are there other 
types) 
   * GREATEST/ LEAST on a combination of expressions (column, expression, 
literal)
   * GREATEST/ LEAST on incompatible columns (string columns)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to