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

    https://github.com/apache/spark/pull/2802#discussion_r19825474
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/hiveUdfs.scala 
---
    @@ -343,9 +344,15 @@ private[hive] case class HiveUdafFunction(
           createFunction[AbstractGenericUDAFResolver]()
         }
     
    -  private val inspectors = exprs.map(_.dataType).map(toInspector).toArray
    -
    -  private val function = 
resolver.getEvaluator(exprs.map(_.dataType.toTypeInfo).toArray)
    +  
    +  private val inspectors = 
    +    if(isUDAFBridgeRequired) exprs.map(ex => 
toInspector(ex.dataType)).toArray
    +    else exprs.map(toInspector).toArray
    +    
    +  private val function = { 
    --- End diff --
    
    Actually, It is other way round.  GenericUDAFResolver and its method 
GenericUDAFEvaluator getEvaluator(TypeInfo[] info) is deprecated and replaced 
by GenericUDAFResolver2. AbstractGenericUDAFResolver is for migration.
    UDAF function like percentile_approx no longer supports the deprecated 
interface. So i have changed this to use 
AbstractGenericUDAFResolver(GenericUDAFParameterInfo).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to