zhztheplayer commented on code in PR #5575:
URL: https://github.com/apache/incubator-gluten/pull/5575#discussion_r1591722695
##########
backends-velox/src/main/scala/org/apache/gluten/execution/HashAggregateExecTransformer.scala:
##########
@@ -60,6 +60,12 @@ abstract class HashAggregateExecTransformer(
resultExpressions,
child) {
+ override def output: Seq[Attribute] = {
+ // TODO: We should have a check to make sure the returned schema actually
matches the output
+ // data. Since "resultExpressions" is not actually in used by Velox.
+ super.output
Review Comment:
> The `projectList` of agg post-project is the `resultExpressions`. Is the
intended expression here something like, when post-project hasn't been
inserted, the output of `HashAggregateExecTransformer` isn't actually equal to
`resultExpressions`?
That's correct. We don't have strict verification between
`groupingExpressions+aggregateExpressions` and `resultExpressions` to ensure
them matching together when instantiating `HashAggregateExecTransformer`, so
there will be risk that unexpected errors happens at runtime when a
`HashAggregateExecTransformer` is created without pre/post project.
I think it will be fine if we can have a check for `needsPreProjection ==
false & needsPostProjection == false` at planning time in `HeuristicApplier` as
well to fix this (I used very similar code to pick executable plan in RAS in
this PR) in future.
Anyway it's just a soft `TODO` since current code doesn't actually impact
anything.
--
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]