Bjoern Toldbod created SPARK-21691:

             Summary: Accessing canonicalized plan for query with limit throws 
                 Key: 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:

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 

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

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to