Github user dilipbiswal commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22809#discussion_r228636110
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
 ---
    @@ -282,6 +283,31 @@ trait RuntimeReplaceable extends UnaryExpression with 
Unevaluable {
       override lazy val canonicalized: Expression = child.canonicalized
     }
     
    +/**
    + * An aggregate expression that gets rewritten (currently by the 
optimizer) into a
    + * different aggregate expression for evaluation. This is mainly used to 
provide compatibility
    + * with other databases. For example, we use this to support every, 
any/some aggregates by rewriting
    + * them with Min and Max respectively.
    + */
    +trait UnevaluableAggregate extends DeclarativeAggregate {
    +
    +  override def nullable: Boolean = true
    --- End diff --
    
    @mgaido91 I think for aggregates, its different ? Please `Max`, `Min`, they 
all define it to be nullable. I think they work on group of rows and can return 
null on empty input.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to