Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-21335

support un-aliased subquery

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.3.0
    • SQL

    Description

      un-aliased subquery is supported by Spark SQL for a long time. Its semantic was not well defined and has confusing behaviors, and it's not a standard SQL syntax, so we disallowed it in https://issues.apache.org/jira/browse/SPARK-20690 .

      However, this is a breaking change, and we do have existing queries using un-aliased subquery. We should add the support back and fix its semantic.

      After the fix, there is no syntax change from branch 2.2 to master, but we invalid a weird use case:
      SELECT v.i from (SELECT i FROM v). Now this query will throw analysis exception because users should not be able to use the qualifier inside a subquery.

      Attachments

        Issue Links

          Activity

            People

              cloud_fan Wenchen Fan
              cloud_fan Wenchen Fan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: