xiedeyantu commented on code in PR #4495:
URL: https://github.com/apache/calcite/pull/4495#discussion_r2261618796


##########
core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java:
##########
@@ -227,7 +227,8 @@ public static SqlCall stripSeparator(SqlCall call) {
         @Override public RelDataType
         inferReturnType(SqlOperatorBinding opBinding) {
           final RelDataType type = super.inferReturnType(opBinding);
-          if (opBinding.getGroupCount() == 0 || opBinding.hasFilter()) {
+          if (opBinding.allowChangeNullable()

Review Comment:
   What I want to express is whether the nullable property of aggregate 
functions can be modified during type inference—it is possible that the initial 
inference already results in nullable being true. In aggCall, I have ensured 
that the original function signatures (including input parameters and return 
values) remain unchanged. The two additional functions I added for this logic 
are only intended to pass the allowChangeNullable flag.



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