[ 
https://issues.apache.org/jira/browse/SPARK-6409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

DoingDone9 updated SPARK-6409:
------------------------------
    Description: 
I run SQL like that 
CREATE TEMPORARY FUNCTION test_avg AS 
'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage'; 
  
SELECT 
    test_avg(1), 
    test_avg(substr(value,5)) 
FROM src; 

then i get a exception
15/03/19 09:36:45 ERROR CliDriver: org.apache.spark.SparkException: Job aborted 
due to stage failure: Task 0 in stage 2.0 failed 4 times, most recent failure: 
Lost task 0.3 in stage 2.0 (TID 6, HPC-3): java.lang.ClassCastException: 
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage$AverageAggregationBuffer
 cannot be cast to 
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator$AbstractAggregationBuffer
 
        at 
org.apache.spark.sql.hive.HiveUdafFunction.<init>(hiveUdfs.scala:369) 
        at 
org.apache.spark.sql.hive.HiveGenericUdaf.newInstance(hiveUdfs.scala:214) 
        at 
org.apache.spark.sql.hive.HiveGenericUdaf.newInstance(hiveUdfs.scala:188) 




> It is not necessary that avoid old inteface of hive that will make some UDAF 
> can work.
> --------------------------------------------------------------------------------------
>
>                 Key: SPARK-6409
>                 URL: https://issues.apache.org/jira/browse/SPARK-6409
>             Project: Spark
>          Issue Type: Question
>          Components: SQL
>    Affects Versions: 1.2.1
>            Reporter: DoingDone9
>
> I run SQL like that 
> CREATE TEMPORARY FUNCTION test_avg AS 
> 'org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage'; 
>   
> SELECT 
>     test_avg(1), 
>     test_avg(substr(value,5)) 
> FROM src; 
> then i get a exception
> 15/03/19 09:36:45 ERROR CliDriver: org.apache.spark.SparkException: Job 
> aborted due to stage failure: Task 0 in stage 2.0 failed 4 times, most recent 
> failure: Lost task 0.3 in stage 2.0 (TID 6, HPC-3): 
> java.lang.ClassCastException: 
> org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage$AverageAggregationBuffer
>  cannot be cast to 
> org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator$AbstractAggregationBuffer
>  
>         at 
> org.apache.spark.sql.hive.HiveUdafFunction.<init>(hiveUdfs.scala:369) 
>         at 
> org.apache.spark.sql.hive.HiveGenericUdaf.newInstance(hiveUdfs.scala:214) 
>         at 
> org.apache.spark.sql.hive.HiveGenericUdaf.newInstance(hiveUdfs.scala:188) 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to