ILuffZhe commented on code in PR #3219:
URL: https://github.com/apache/calcite/pull/3219#discussion_r1245963283


##########
core/src/main/java/org/apache/calcite/sql/dialect/PostgresqlSqlDialect.java:
##########
@@ -97,6 +104,39 @@ public PostgresqlSqlDialect(Context context) {
         SqlParserPos.ZERO);
   }
 
+  @Override public SqlNode rewriteSingleValueExpr(SqlNode aggCall, RelDataType 
relDataType) {
+    final SqlNode operand = ((SqlBasicCall) aggCall).operand(0);
+    final SqlLiteral nullLiteral = SqlLiteral.createNull(SqlParserPos.ZERO);
+    final SqlNode unionOperand =

Review Comment:
   Out of curiosity, why do we cast null here. What if we use **select null 
union all select null**.



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