org.apache.spark.sql.AnalysisException: Unable to resolve Sepal.Length given [Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, Species];

GitHub | kevinushey | 6 months ago
  1. 0

    GitHub comment 9#223693655

    GitHub | 6 months ago | kevinushey
    org.apache.spark.sql.AnalysisException: Unable to resolve Sepal.Length given [Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, Species];
  2. 0

    How to deal with dots (.) in column names in SparkR

    Stack Overflow | 3 months ago | Mohit Bansal
    org.apache.spark.sql.AnalysisException: Unable to resolve Sepal.Length given [Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, Species];
  3. 0

    Spark 2.0.0 - Dot in column name causes reading csv to fail

    GitHub | 4 months ago | anshbansal
    org.apache.spark.sql.AnalysisException: Unable to resolve impressionid.1 given [impressionid.1];
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    My code: {quote} case class TestData(key: Int, value: String) case class TestData2(a: Int, b: Int) import org.apache.spark.sql.execution.joins._ import sqlContext.implicits._ val testData = sc.parallelize( (1 to 100).map(i => TestData(i, i.toString))).toDF() testData.registerTempTable("testData") val testData2 = sc.parallelize( TestData2(1, 1) :: TestData2(1, 2) :: TestData2(2, 1) :: TestData2(2, 2) :: TestData2(3, 1) :: TestData2(3, 2) :: Nil, 2).toDF() testData2.registerTempTable("testData2") //val tmp = sqlContext.sql("SELECT * FROM testData *LEFT SEMI JOIN* testData2 ON key = a ") val tmp = sqlContext.sql("SELECT testData2.b, count(testData2.b) FROM testData *LEFT SEMI JOIN* testData2 ON key = testData2.a group by testData2.b") tmp.explain() {quote} Error log: {quote} org.apache.spark.sql.AnalysisException: cannot resolve 'testData2.b' given input columns key, value; line 1 pos 108 at org.apache.spark.sql.catalyst.analysis.package$AnalysisErrorAt.failAnalysis(package.scala:42) at org.apache.spark.sql.catalyst.analysis.CheckAnalysis$$anonfun$apply$3$$anonfun$apply$1.applyOrElse(CheckAnalysis.scala:48) at org.apache.spark.sql.catalyst.analysis.CheckAnalysis$$anonfun$apply$3$$anonfun$apply$1.applyOrElse(CheckAnalysis.scala:45) at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformUp$1.apply(TreeNode.scala:250) at org.apache.spark.sql.catalyst.trees.TreeNode$$anonfun$transformUp$1.apply(TreeNode.scala:250) at org.apache.spark.sql.catalyst.trees.CurrentOrigin$.withOrigin(TreeNode.scala:50) at org.apache.spark.sql.catalyst.trees.TreeNode.transformUp(TreeNode.scala:249) at org.apache.spark.sql.catalyst.plans.QueryPlan.org$apache$spark$sql$catalyst$plans$QueryPlan$$transformExpressionUp$1(QueryPlan.scala:103) at org.apache.spark.sql.catalyst.plans.QueryPlan$$anonfun$2$$anonfun$apply$2.apply(QueryPlan.scala:117) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244) at scala.collection.immutable.List.foreach(List.scala:318) {quote} {quote}SELECT * FROM testData LEFT SEMI JOIN testData2 ON key = a{quote} is correct, {quote} SELECT a FROM testData LEFT SEMI JOIN testData2 ON key = a SELECT max(value) FROM testData LEFT SEMI JOIN testData2 ON key = a group by b SELECT max(value) FROM testData LEFT SEMI JOIN testData2 ON key = testData2.a group by testData2.b SELECT testData2.b, count(testData2.b) FROM testData LEFT SEMI JOIN testData2 ON key = testData2.a group by testData2.b {quote} are incorrect.

    Apache's JIRA Issue Tracker | 2 years ago | Zhichao Zhang
    org.apache.spark.sql.AnalysisException: cannot resolve 'testData2.b' given input columns key, value; line 1 pos 108
  6. 0

    GitHub comment 92#231412318

    GitHub | 5 months ago | hiltonmbr
    org.apache.spark.sql.AnalysisException: cannot resolve '`X_c0`' given input columns: [_c20, _c19, _c18, _c29, _c30, _c8, _c27, _c26, _c14, _c0, _c38, _c15, _c3, _c39, _c36, _c35, _c37, _c17, _c5, _c11, _c31, _c33, _c6, _c25, _c34, _c28, _c10, _c12, _c40, _c32, _c9, _c2, _c21, _c22, _c1, _c23, _c4, _c7, _c13, _c24, _c16]; line 2 pos 13

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.spark.sql.AnalysisException

      Unable to resolve Sepal.Length given [Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, Species];

      at org.apache.spark.sql.catalyst.plans.logical.LogicalPlan$$anonfun$resolve$1$$anonfun$apply$5.apply()
    2. Spark Project Catalyst
      LogicalPlan$$anonfun$resolve$1$$anonfun$apply$5.apply
      1. org.apache.spark.sql.catalyst.plans.logical.LogicalPlan$$anonfun$resolve$1$$anonfun$apply$5.apply(LogicalPlan.scala:134)
      2. org.apache.spark.sql.catalyst.plans.logical.LogicalPlan$$anonfun$resolve$1$$anonfun$apply$5.apply(LogicalPlan.scala:134)
      2 frames
    3. Scala
      Option.getOrElse
      1. scala.Option.getOrElse(Option.scala:121)
      1 frame
    4. Spark Project Catalyst
      LogicalPlan$$anonfun$resolve$1.apply
      1. org.apache.spark.sql.catalyst.plans.logical.LogicalPlan$$anonfun$resolve$1.apply(LogicalPlan.scala:133)
      2. org.apache.spark.sql.catalyst.plans.logical.LogicalPlan$$anonfun$resolve$1.apply(LogicalPlan.scala:129)
      2 frames
    5. Scala
      AbstractIterator.foreach
      1. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
      2. scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
      3. scala.collection.Iterator$class.foreach(Iterator.scala:893)
      4. scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
      4 frames