cloud-fan commented on a change in pull request #35735:
URL: https://github.com/apache/spark/pull/35735#discussion_r822369382



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/HistogramNumeric.scala
##########
@@ -72,6 +74,8 @@ case class HistogramNumeric(
     case n: Int => n
   }
 
+  private def propagateInputType: Boolean = 
SQLConf.get.histogramNumericPropagateInputType

Review comment:
       This is another tricky thing: the semantic/behavior of an expression 
should be static, not dynamic that can be changed in the middle at runtime. 
Think about a user who creates a view with this function, then he/she read the 
view back, the behavior should be the same with when the view was created, no 
matter what the config is currently.
   
   That's why we have `case class Size(child: Expression, legacySizeOfNull: 
Boolean)`: we put the flag in constructor, so that the semantic/behavior is 
fixed once the expression is created.
   




-- 
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]

Reply via email to