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

Resolve star expressions in subquery

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.2.0
    • SQL
    • None

    Description

      Currently, Spark does not resolve star expressions in subqueries correctly. It can only resolve the star expressions using the inner query attributes. For example:

      CREATE VIEW t(a) AS VALUES (1), (2);

      SELECT * FROM t WHERE a in (SELECT t.*)

      SELECT * FROM t, LATERAL (SELECT t.*)

      org.apache.spark.sql.AnalysisException: cannot resolve 't.*' given input columns '';

      Instead, we should try to resolve star expressions in subquery first using the inner attributes and then using the outer query attributes.

      Attachments

        Issue Links

          Activity

            People

              allisonwang-db Allison Wang
              allisonwang-db Allison Wang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: