lgbo-ustc commented on code in PR #5311:
URL: https://github.com/apache/incubator-gluten/pull/5311#discussion_r1556817411
##########
backends-clickhouse/src/main/scala/org/apache/gluten/execution/CHHashAggregateExecTransformer.scala:
##########
@@ -349,13 +349,18 @@ case class CHHashAggregateExecTransformer(
(makeStructTypeSingleOne(child.dataType, child.nullable),
child.nullable)
case covar: Covariance =>
var fields = Seq[(DataType, Boolean)]()
- fields = fields :+ (covar.left.dataType, covar.left.nullable)
- fields = fields :+ (covar.right.dataType, covar.right.nullable)
+ // when COVAR_SAMP's input is non-nullable , due to its output
maybe null in spark,
+ // backend parser will cast input type to nullable for
intermediate agg,
+ // While final stage still use input type no changed.
+ // It causes type miss match between partial and final
AggregationFunction
+ // so directly assign attr.nullable here, which should always be
nullable
+ fields = fields :+ (covar.left.dataType, attr.nullable)
+ fields = fields :+ (covar.right.dataType, attr.nullable)
Review Comment:
is there any case?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]