xuzifu666 commented on code in PR #5103:
URL: https://github.com/apache/calcite/pull/5103#discussion_r3585069816
##########
core/src/main/java/org/apache/calcite/sql/type/ReturnTypes.java:
##########
@@ -1581,8 +1581,11 @@ private static RelDataType
multivalentStringWithSepSumPrecision(
final RelDataType relDataType =
typeFactory.getTypeSystem().deriveAvgAggType(typeFactory,
opBinding.getOperandType(0));
+ final SqlKind kind = opBinding.getOperator().kind;
if (opBinding.hasEmptyGroup() || opBinding.hasFilter()
- || opBinding.getOperator().kind == SqlKind.STDDEV_SAMP) {
+ || kind == SqlKind.STDDEV_SAMP
+ || kind == SqlKind.VAR_SAMP
+ || kind == SqlKind.COVAR_SAMP) {
Review Comment:
Here have a question: `AVG_AGG_FUNCTION` has been updated to include `||
kind == SqlKind.COVAR_SAMP`, but `COVAR_SAMP` actually uses
`SqlCovarAggFunction` and `ReturnTypes.COVAR_REGR_FUNCTION`, so it shouldn't
fall under `AVG_AGG_FUNCTION`.
Does this mean we also need to make adjustments for `COVAR_REGR_FUNCTION`?
--
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]