julianhyde commented on code in PR #3022:
URL: https://github.com/apache/calcite/pull/3022#discussion_r1065030991


##########
core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java:
##########
@@ -4769,4 +4769,18 @@ void checkUserDefinedOrderByOver(NullCollation 
nullCollation) {
     String sql = "SELECT CAST(CAST(? AS INTEGER) AS CHAR)";
     sql(sql).ok();
   }
+
+  /**
+   * Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-5468";>[CALCITE-5468]
+   * SqlToRelConverter should register sub-queries inside ORDER BY clause
+   * for queries without aggregation</a>.
+   */
+  @Test void testOrderByWithSubQuery() {
+    String sql = "SELECT empno\n"
+        + "FROM emp\n"
+        + "ORDER BY\n"
+        + "CASE WHEN empno IN (1,2) THEN 0 ELSE 1 END";
+    sql(sql).ok();
+  }

Review Comment:
   Don't put stuff on the end. It causes merge conflicts. Put it in the most 
logical place.



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

Reply via email to