org.apache.spark.sql.AnalysisException: undefined function percentile_approx;

Stack Overflow | Hitesh Goyal | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Calculating median on the spark dataframe

    Stack Overflow | 6 months ago | Hitesh Goyal
    org.apache.spark.sql.AnalysisException: undefined function percentile_approx;
  2. 0

    undefined function collect_set, when using this function in DataFrame

    Stack Overflow | 5 months ago | Shankar
    org.apache.spark.sql.AnalysisException: undefined function collect_set;
  3. 0

    How Can collect_set find the source?

    Stack Overflow | 2 weeks ago | daxue
    org.apache.spark.sql.AnalysisException: undefined function collect_set;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Apache Spark 1.6.0, callUDF is failing

    Stack Overflow | 1 year ago | Harvinder Singh
    org.apache.spark.sql.AnalysisException: undefined function test;

    1 unregistered visitors

    Root Cause Analysis

    1. org.apache.spark.sql.AnalysisException

      undefined function percentile_approx;

      at org.apache.spark.sql.catalyst.analysis.SimpleFunctionRegistry$$anonfun$2.apply()
    2. Spark Project Catalyst
      SimpleFunctionRegistry$$anonfun$2.apply
      1. org.apache.spark.sql.catalyst.analysis.SimpleFunctionRegistry$$anonfun$2.apply(FunctionRegistry.scala:65)
      2. org.apache.spark.sql.catalyst.analysis.SimpleFunctionRegistry$$anonfun$2.apply(FunctionRegistry.scala:65)
      2 frames
    3. Scala
      Option.getOrElse
      1. scala.Option.getOrElse(Option.scala:120)
      1 frame
    4. Spark Project Catalyst
      TreeNode$$anonfun$4.apply
      1. org.apache.spark.sql.catalyst.analysis.SimpleFunctionRegistry.lookupFunction(FunctionRegistry.scala:64)
      2. org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveFunctions$$anonfun$apply$12$$anonfun$applyOrElse$5$$anonfun$applyOrElse$24.apply(Analyzer.scala:574)
      3. org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveFunctions$$anonfun$apply$12$$anonfun$applyOrElse$5$$anonfun$applyOrElse$24.apply(Analyzer.scala:574)
      4. org.apache.spark.sql.catalyst.analysis.package$.withPosition(package.scala:48)
      5. org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveFunctions$$anonfun$apply$12$$anonfun$applyOrElse$5.applyOrElse(Analyzer.scala:573)
      6. org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveFunctions$$anonfun$apply$12$$anonfun$applyOrElse$5.applyOrElse(Analyzer.scala:570)
      7. org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:259)
      8. org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$3.apply(TreeNode.scala:259)
      9. org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:69)
      10. org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala:258)
      11. org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformDown$1.apply(TreeNode.scala:264)
      12. org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformDown$1.apply(TreeNode.scala:264)
      13. org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$4.apply(TreeNode.scala:281)
      13 frames
    5. Scala
      AbstractIterator.toArray
      1. scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
      2. scala.collection.Iterator$class.foreach(Iterator.scala:727)
      3. scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
      4. scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48)
      5. scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:103)
      6. scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:47)
      7. scala.collection.TraversableOnce$class.to(TraversableOnce.scala:273)
      8. scala.collection.AbstractIterator.to(Iterator.scala:1157)
      9. scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:265)
      10. scala.collection.AbstractIterator.toBuffer(Iterator.scala:1157)
      11. scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:252)
      12. scala.collection.AbstractIterator.toArray(Iterator.scala:1157)
      12 frames
    6. Spark Project Catalyst
      QueryPlan$$anonfun$org$apache$spark$sql$catalyst$plans$QueryPlan$$recursiveTransform$1$1.apply
      1. org.apache.spark.sql.catalyst.trees.TreeNode.transformChildren(TreeNode.scala:321)
      2. org.apache.spark.sql.catalyst.trees.TreeNode.transformDown(TreeNode.scala:264)
      3. org.apache.spark.sql.catalyst.plans.QueryPlan.transformExpressionDown$1(QueryPlan.scala:75)
      4. org.apache.spark.sql.catalyst.plans.QueryPlan.org$apache$spark$sql$catalyst$plans$QueryPlan$$recursiveTransform$1(QueryPlan.scala:85)
      5. org.apache.spark.sql.catalyst.plans.QueryPlan$$anonfun$org$apache$spark$sql$catalyst$plans$QueryPlan$$recursiveTransform$1$1.apply(QueryPlan.scala:89)
      5 frames
    7. Scala
      AbstractTraversable.map
      1. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      2. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
      3. scala.collection.immutable.List.foreach(List.scala:318)
      4. scala.collection.TraversableLike$class.map(TraversableLike.scala:244)
      5. scala.collection.AbstractTraversable.map(Traversable.scala:105)
      5 frames
    8. Spark Project Catalyst
      QueryPlan$$anonfun$1.apply
      1. org.apache.spark.sql.catalyst.plans.QueryPlan.org$apache$spark$sql$catalyst$plans$QueryPlan$$recursiveTransform$1(QueryPlan.scala:89)
      2. org.apache.spark.sql.catalyst.plans.QueryPlan$$anonfun$1.apply(QueryPlan.scala:94)
      2 frames
    9. Scala
      AbstractIterator.toArray
      1. scala.collection.Iterator$$anon$11.next(Iterator.scala:328)
      2. scala.collection.Iterator$class.foreach(Iterator.scala:727)
      3. scala.collection.AbstractIterator.foreach(Iterator.scala:1157)
      4. scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:48)
      5. scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:103)
      6. scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:47)
      7. scala.collection.TraversableOnce$class.to(TraversableOnce.scala:273)
      8. scala.collection.AbstractIterator.to(Iterator.scala:1157)
      9. scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:265)
      10. scala.collection.AbstractIterator.toBuffer(Iterator.scala:1157)
      11. scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:252)
      12. scala.collection.AbstractIterator.toArray(Iterator.scala:1157)
      12 frames
    10. Spark Project Catalyst
      RuleExecutor$$anonfun$execute$1$$anonfun$apply$1.apply
      1. org.apache.spark.sql.catalyst.plans.QueryPlan.transformExpressionsDown(QueryPlan.scala:94)
      2. org.apache.spark.sql.catalyst.plans.QueryPlan.transformExpressions(QueryPlan.scala:64)
      3. org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveFunctions$$anonfun$apply$12.applyOrElse(Analyzer.scala:570)
      4. org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveFunctions$$anonfun$apply$12.applyOrElse(Analyzer.scala:568)
      5. org.apache.spark.sql.catalyst.plans.logical.LogicalPlan$$anonfun$resolveOperators$1.apply(LogicalPlan.scala:57)
      6. org.apache.spark.sql.catalyst.plans.logical.LogicalPlan$$anonfun$resolveOperators$1.apply(LogicalPlan.scala:57)
      7. org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:69)
      8. org.apache.spark.sql.catalyst.plans.logical.LogicalPlan.resolveOperators(LogicalPlan.scala:56)
      9. org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveFunctions$.apply(Analyzer.scala:568)
      10. org.apache.spark.sql.catalyst.analysis.Analyzer$ResolveFunctions$.apply(Analyzer.scala:567)
      11. org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1$$anonfun$apply$1.apply(RuleExecutor.scala:83)
      12. org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1$$anonfun$apply$1.apply(RuleExecutor.scala:80)
      12 frames
    11. Scala
      List.foldLeft
      1. scala.collection.LinearSeqOptimized$class.foldLeft(LinearSeqOptimized.scala:111)
      2. scala.collection.immutable.List.foldLeft(List.scala:84)
      2 frames
    12. Spark Project Catalyst
      RuleExecutor$$anonfun$execute$1.apply
      1. org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1.apply(RuleExecutor.scala:80)
      2. org.apache.spark.sql.catalyst.rules.RuleExecutor$$anonfun$execute$1.apply(RuleExecutor.scala:72)
      2 frames
    13. Scala
      List.foreach
      1. scala.collection.immutable.List.foreach(List.scala:318)
      1 frame
    14. Spark Project Catalyst
      RuleExecutor.execute
      1. org.apache.spark.sql.catalyst.rules.RuleExecutor.execute(RuleExecutor.scala:72)
      1 frame
    15. Spark Project SQL
      SQLContext.sql
      1. org.apache.spark.sql.execution.QueryExecution.analyzed$lzycompute(QueryExecution.scala:36)
      2. org.apache.spark.sql.execution.QueryExecution.analyzed(QueryExecution.scala:36)
      3. org.apache.spark.sql.execution.QueryExecution.assertAnalyzed(QueryExecution.scala:34)
      4. org.apache.spark.sql.DataFrame.<init>(DataFrame.scala:133)
      5. org.apache.spark.sql.DataFrame$.apply(DataFrame.scala:52)
      6. org.apache.spark.sql.SQLContext.sql(SQLContext.scala:817)
      6 frames
    16. com.cloudera.sparkwordcount
      JavaWordCount.main
      1. com.cloudera.sparkwordcount.JavaWordCount.<init>(JavaWordCount.java:41)
      2. com.cloudera.sparkwordcount.JavaWordCount.main(JavaWordCount.java:131)
      2 frames
    17. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:606)
      4 frames
    18. Spark
      SparkSubmit.main
      1. org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:731)
      2. org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
      3. org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
      4. org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
      5. org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
      5 frames