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


##########
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:
   all aggregates return null when applied to an empty set.
   but if getGroupCount() != 0 the set can never be empty (because then there 
would be no aggregate at all)



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