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

    https://github.com/apache/spark/pull/22809#discussion_r228239274
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/Max.scala
 ---
    @@ -57,3 +57,34 @@ case class Max(child: Expression) extends 
DeclarativeAggregate {
     
       override lazy val evaluateExpression: AttributeReference = max
     }
    +
    +abstract class AnyAggBase(arg: Expression)
    +  extends UnevaluableAggrgate with ImplicitCastInputTypes {
    +
    +  override def children: Seq[Expression] = arg :: Nil
    +
    +  override def dataType: DataType = BooleanType
    +
    +  override def inputTypes: Seq[AbstractDataType] = Seq(BooleanType)
    +
    +  override def checkInputDataTypes(): TypeCheckResult = {
    +    arg.dataType match {
    +      case dt if dt != BooleanType =>
    +        TypeCheckResult.TypeCheckFailure(s"Input to function '$prettyName' 
should have been " +
    +          s"${BooleanType.simpleString}, but it's 
[${arg.dataType.catalogString}].")
    +      case _ => TypeCheckResult.TypeCheckSuccess
    +    }
    +  }
    +}
    +
    +@ExpressionDescription(
    +  usage = "_FUNC_(expr) - Returns true if at least one value of `expr` is 
true.")
    --- End diff --
    
    @mgaido91 @cloud-fan Thanks .. will add.


---

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

Reply via email to