1
0
Fork 0

Merging upstream version 18.4.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:01:12 +01:00
parent b982664fe2
commit d90681de49
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
92 changed files with 43076 additions and 40554 deletions

View file

@ -310,6 +310,21 @@ FROM
t1;
SELECT x.a AS a, x.b AS b, ROW_NUMBER() OVER (PARTITION BY x.a ORDER BY x.a) AS row_num FROM x AS x;
# title: Don't merge window functions, inner table is aliased in outer query
with t1 as (
SELECT
ROW_NUMBER() OVER (PARTITION BY x.a ORDER BY x.a) as row_num
FROM
x
)
SELECT
t2.row_num
FROM
t1 AS t2
WHERE
t2.row_num = 2;
WITH t1 AS (SELECT ROW_NUMBER() OVER (PARTITION BY x.a ORDER BY x.a) AS row_num FROM x AS x) SELECT t2.row_num AS row_num FROM t1 AS t2 WHERE t2.row_num = 2;
# title: Values Test
# dialect: spark
WITH t1 AS (