Github user chenghao-intel commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3247#discussion_r27783787
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregates.scala
 ---
    @@ -17,285 +17,159 @@
     
     package org.apache.spark.sql.catalyst.expressions
     
    -import com.clearspring.analytics.stream.cardinality.HyperLogLog
    -
     import org.apache.spark.sql.types._
    -import org.apache.spark.sql.catalyst.trees
    -import org.apache.spark.sql.catalyst.errors.TreeNodeException
    -import org.apache.spark.util.collection.OpenHashSet
    -
    -abstract class AggregateExpression extends Expression {
    -  self: Product =>
     
    -  /**
    -   * Creates a new instance that can be used to compute this aggregate 
expression for a group
    -   * of input rows/
    -   */
    -  def newInstance(): AggregateFunction
     
    -  /**
    -   * [[AggregateExpression.eval]] should never be invoked because 
[[AggregateExpression]]'s are
    -   * replaced with a physical aggregate operator at runtime.
    -   */
    -  override def eval(input: Row = null): EvaluatedType =
    -    throw new TreeNodeException(this, s"No function to evaluate 
expression. type: ${this.nodeName}")
    -}
    +/**
    + * This is from 
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator.Mode
    + * Just a hint for the UDAF developers which stage we are about to process,
    + * However, we probably don't want the developers knows so many details, 
here
    + * is just for keep consistent with Hive (when integrated with Hive), need 
to
    + * figure out if we have work around for that soon.
    + */
    +@deprecated
    +trait Mode
    --- End diff --
    
    This is also for integrated with Hive UDAF.We have the casting between Hive 
Mode and Spark SQL Mode.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to