spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Gaido (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SPARK-26063) CatalystDataToAvro gives "UnresolvedException: Invalid call to dataType on unresolved object" when requested for numberedTreeString
Date Thu, 15 Nov 2018 12:38:22 GMT

    [ https://issues.apache.org/jira/browse/SPARK-26063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687971#comment-16687971
] 

Marco Gaido commented on SPARK-26063:
-------------------------------------

I think this was fixed in SPARK-25883. But we may want to backport to 2.4 line if it is a
bug instead of an improvement.  cc [~Gengliang.Wang] [~smilegator].

> CatalystDataToAvro gives "UnresolvedException: Invalid call to dataType on unresolved
object" when requested for numberedTreeString
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-26063
>                 URL: https://issues.apache.org/jira/browse/SPARK-26063
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.4.0
>            Reporter: Jacek Laskowski
>            Priority: Major
>
> The following gives {{org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid
call to dataType on unresolved object, tree: 'id}}:
> {code:java}
> // ./bin/spark-shell --packages org.apache.spark:spark-avro_2.12:2.4.0
> scala> spark.version
> res0: String = 2.4.0
> import org.apache.spark.sql.avro._
> val q = spark.range(1).withColumn("to_avro_id", to_avro('id))
> val logicalPlan = q.queryExecution.logical
> scala> logicalPlan.expressions.drop(1).head.numberedTreeString
> org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to dataType
on unresolved object, tree: 'id
> at org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute.dataType(unresolved.scala:105)
> at org.apache.spark.sql.avro.CatalystDataToAvro.simpleString(CatalystDataToAvro.scala:56)
> at org.apache.spark.sql.catalyst.expressions.Expression.verboseString(Expression.scala:233)
> at org.apache.spark.sql.catalyst.trees.TreeNode.generateTreeString(TreeNode.scala:548)
> at org.apache.spark.sql.catalyst.trees.TreeNode.generateTreeString(TreeNode.scala:569)
> at org.apache.spark.sql.catalyst.trees.TreeNode.treeString(TreeNode.scala:472)
> at org.apache.spark.sql.catalyst.trees.TreeNode.treeString(TreeNode.scala:469)
> at org.apache.spark.sql.catalyst.trees.TreeNode.numberedTreeString(TreeNode.scala:483)
> ... 51 elided{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message