You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Vladimir Golubev (Jira)" <ji...@apache.org> on 2025/02/27 11:20:00 UTC

[jira] [Created] (SPARK-51337) Add maxRows field to CTERelationRef

Vladimir Golubev created SPARK-51337:
----------------------------------------

             Summary: Add maxRows field to CTERelationRef
                 Key: SPARK-51337
                 URL: https://issues.apache.org/jira/browse/SPARK-51337
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 4.1.0
            Reporter: Vladimir Golubev


The Analyzer validates scalar subqueries by checking if it outputs just one row or not: https://github.com/vladimirg-db/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ValidateSubqueryExpression.scala#L144.

This works in fixed-point Analyzer, because CTEs are inlined before CheckAnalysis. However, in single-pass Analyzer, we validate the subquery right after its validation, so CTERelationRef must output correct maxRows as well.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org