[ https://issues.apache.org/jira/browse/SPARK-21691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16139656#comment-16139656 ]
Fei Shao commented on SPARK-21691: ---------------------------------- [~aokolnychyi] About the *"override def output: Seq[Attribute] = if (resolved) projectList.map(_.toAttribute) else Nil"* , which file shall I put it to please? I put it to the "case class UnresolvedRelation(tableIdentifier: TableIdentifier) extends LeafNode ", I can't compile it. Because the projectList is not recognized by compiler. My code is version 2.2.0. > Accessing canonicalized plan for query with limit throws exception > ------------------------------------------------------------------ > > Key: SPARK-21691 > URL: https://issues.apache.org/jira/browse/SPARK-21691 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.2.0 > Reporter: Bjoern Toldbod > > Accessing the logical, canonicalized plan fails for queries with limits. > The following demonstrates the issue: > {code:java} > val session = SparkSession.builder.master("local").getOrCreate() > // This works > session.sql("select * from (values 0, > 1)").queryExecution.logical.canonicalized > // This fails > session.sql("select * from (values 0, 1) limit > 1").queryExecution.logical.canonicalized > {code} > The message in the thrown exception is somewhat confusing (or at least not > directly related to the limit): > "Invalid call to toAttribute on unresolved object, tree: *" -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org