ueshin commented on PR #36094:
URL: https://github.com/apache/spark/pull/36094#issuecomment-1105554760
A weird error message is seen as follows likely caused by this PR:
```
scala> val df = spark.range(2)
df: org.apache.spark.sql.Dataset[Long] = [id: bigint]
scala> df.select("i")
org.apache.spark.sql.AnalysisException: Invalid call to dataType on
unresolved object;
'Project ['i]
+- Range (0, 2, step=1, splits=Some(16))
at
org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute.dataType(unresolved.scala:137)
at
org.apache.spark.sql.catalyst.analysis.CheckAnalysis.$anonfun$checkAnalysis$4(CheckAnalysis.scala:164)
at
org.apache.spark.sql.catalyst.analysis.CheckAnalysis.$anonfun$checkAnalysis$4$adapted(CheckAnalysis.scala:164)
at
scala.collection.IndexedSeqOptimized.prefixLengthImpl(IndexedSeqOptimized.scala:41)
at
scala.collection.IndexedSeqOptimized.exists(IndexedSeqOptimized.scala:49)
at
scala.collection.IndexedSeqOptimized.exists$(IndexedSeqOptimized.scala:49)
at scala.collection.mutable.ArrayBuffer.exists(ArrayBuffer.scala:49)
at
org.apache.spark.sql.catalyst.analysis.CheckAnalysis.$anonfun$checkAnalysis$1(CheckAnalysis.scala:164)
at
org.apache.spark.sql.catalyst.analysis.CheckAnalysis.$anonfun$checkAnalysis$1$adapted(CheckAnalysis.scala:100)
at
org.apache.spark.sql.catalyst.trees.TreeNode.foreachUp(TreeNode.scala:357)
at
org.apache.spark.sql.catalyst.analysis.CheckAnalysis.checkAnalysis(CheckAnalysis.scala:100)
at
org.apache.spark.sql.catalyst.analysis.CheckAnalysis.checkAnalysis$(CheckAnalysis.scala:95)
at
org.apache.spark.sql.catalyst.analysis.Analyzer.checkAnalysis(Analyzer.scala:187)
...
```
The error message should be the following as the master branch shows:
```
org.apache.spark.sql.AnalysisException: Column 'i' does not exist. Did you
mean one of the following? [id];
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]