NobiGo commented on code in PR #3935:
URL: https://github.com/apache/calcite/pull/3935#discussion_r1733771137


##########
core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java:
##########
@@ -1414,7 +1415,9 @@ private static RelDataType 
multivalentStringWithSepSumPrecision(
     final RelDataType relDataType =
         typeFactory.getTypeSystem().deriveCovarType(typeFactory,
             opBinding.getOperandType(0), opBinding.getOperandType(1));
-    if (opBinding.getGroupCount() == 0 || opBinding.hasFilter()) {
+    if (opBinding.getGroupCount() == 0 || opBinding.hasFilter()
+        || opBinding.getOperator().kind == SqlKind.COVAR_POP

Review Comment:
   According to 
https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/COVAR_POP.html.
 This function return type is nullable.
   ```
   The function returns a value of type NUMBER. If the function is applied to 
an empty set, then it returns 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