Lauri Koobas created SPARK-37500:
------------------------------------
Summary: Incorrect scope when using named_windows in CTEs
Key: SPARK-37500
URL: https://issues.apache.org/jira/browse/SPARK-37500
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 3.2.0, 3.1.2
Environment: Databricks Runtime 9.0, 9.1, 10.0
Reporter: Lauri Koobas
This works, but shouldn't. The named_window is described outside the CTE that
uses it.
```with step_1 as (
select *
, min(a) over w1 as min_a_over_w1
from (select 1 as a, 2 as b, 3 as c)
)
select *
from step_1
window w1 as (partition by b order by c)
```
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]