amaliujia commented on a change in pull request #35404:
URL: https://github.com/apache/spark/pull/35404#discussion_r800938632
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Average.scala
##########
@@ -46,6 +46,8 @@ case class Average(
def this(child: Expression) = this(child, failOnError =
SQLConf.get.ansiEnabled)
+ override lazy val resolved: Boolean = children.forall(_.resolved)
Review comment:
Do you agree the way in this PR for Average? If so I can go to check
existing expressions and make them follow the same way?
Basically if we make one expression as resolved when `all children is
solved` && `data type match`, in the case of the TempResolveColumn usage, we
could have wrong error message in the later stage (it reports `column not
found`, which is not true).
If we change to say such expression can be marked as resolved only `all
children is solved`, later in the CheckAnalysis, it will report data mismatch.
If the proposal change is not the good way to fix this issue, is there a
better way?
--
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]