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: [email protected]
For additional commands, e-mail: [email protected]