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

Allow LateralJoin node to host non-deterministic expressions when the outer query is a single row relation

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.1
    • 3.3.0
    • SQL
    • None

    Description

      After https://issues.apache.org/jira/browse/SPARK-37199, Analyzer will block LateralJoin that has non-deterministic lateral subqueries. But when the outer query is a single row relation, this should be allowed

      For example:
      Query:

      SELECT * FROM VALUES(0) t(x) JOIN LATERAL (SELECT rand(0) + x AS y); 

      Result:

      org.apache.spark.sql.AnalysisException: nondeterministic expressions are only allowed in
      Project, Filter, Aggregate or Window

       

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment