cloud-fan commented on a change in pull request #30703:
URL: https://github.com/apache/spark/pull/30703#discussion_r540800267
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -2963,7 +2963,11 @@ class Analyzer(override val catalogManager:
CatalogManager)
private def getNondeterToAttr(exprs: Seq[Expression]): Map[Expression,
NamedExpression] = {
exprs.filterNot(_.deterministic).flatMap { expr =>
- val leafNondeterministic = expr.collect { case n: Nondeterministic =>
n }
+ val leafNondeterministic = expr.collect {
+ case n: Nondeterministic => n
+ case e: CallMethodViaReflection => e
+ case udf: UserDefinedExpression if !udf.deterministic => udf
Review comment:
ah, so we need to collect leaf non-deterministic nodes here. Shall we
create a trait for them?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]