mihaibudiu commented on code in PR #3817:
URL: https://github.com/apache/calcite/pull/3817#discussion_r1644813475


##########
core/src/main/java/org/apache/calcite/util/RelToSqlConverterUtil.java:
##########
@@ -93,6 +101,41 @@ public static void unparseSparkArrayAndMap(SqlWriter writer,
     writer.endList(frame);
   }
 
+
+  /**
+   * Rewrite SINGLE_VALUE use SparkSQL Mode.
+   *
+   * <blockquote><pre>
+   * CASE COUNT(*)
+   * WHEN 0 THEN NULL
+   * WHEN 1 THEN MIN(&lt;result&gt;)
+   * ELSE (SELECT NULL UNION ALL SELECT NULL))

Review Comment:
   Please add the explanations you gave here as comments in the code.
   It will make maintaining the code much easier.



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