Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-4263

PERCENTILE is not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • SQL
    • None

    Description

      sqlContext.sql("select percentile(age, array(0, 0.5, 1)) from people").collect()

      java.lang.ClassCastException: scala.collection.mutable.ArrayBuffer
      cannot be cast to [Ljava.lang.Object;

      at
      org.apache.hadoop.hive.serde2.objectinspector.StandardListObjectInspector.getListLength(StandardListObjectInspector.java:83)

      at
      org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorConverters$ListConverter.convert(ObjectInspectorConverters.java:259)

      at
      org.apache.hadoop.hive.ql.udf.generic.GenericUDFUtils$ConversionHelper.convertIfNecessary(GenericUDFUtils.java:349)

      at
      org.apache.hadoop.hive.ql.udf.generic.GenericUDAFBridge$GenericUDAFBridgeEvaluator.iterate(GenericUDAFBridge.java:170)

      at org.apache.spark.sql.hive.HiveUdafFunction.update(hiveUdfs.scala:342)

      at
      org.apache.spark.sql.execution.Aggregate$$anonfun$execute$1$$anonfun$6.apply(Aggregate.scala:135)

      at
      org.apache.spark.sql.execution.Aggregate$$anonfun$execute$1$$anonfun$6.apply(Aggregate.scala:128)

      at org.apache.spark.rdd.RDD$$anonfun$13.apply(RDD.scala:599)

      at org.apache.spark.rdd.RDD$$anonfun$13.apply(RDD.scala:599)

      at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:35)

      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:262)

      at org.apache.spark.rdd.RDD.iterator(RDD.scala:229)

      at org.apache.spark.rdd.MappedRDD.compute(MappedRDD.scala:31)

      at org.apache.spark.rdd.RDD.computeOrReadCheckpoint(RDD.scala:262)

      Thanks,
      Kevin Paul

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              chenghao Cheng Hao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: