Skip to content

Commit

Permalink
fix golden files
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-toth committed Jun 2, 2023
1 parent 2eeff73 commit 206e9a8
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 57 deletions.
102 changes: 51 additions & 51 deletions sql/core/src/test/resources/sql-tests/analyzer-results/cte.sql.out
Expand Up @@ -299,56 +299,56 @@ WITH w1(c1) AS
SELECT * FROM w1
-- !query analysis
WithCTE
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias w8
: +- Project [1#x AS c8#x]
: +- Project [1 AS 1#x]
: +- OneRowRelation
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias w7
: +- Project [c8#x AS c7#x]
: +- Project [c8#x]
: +- SubqueryAlias w8
: +- CTERelationRef xxxx, true, [c8#x]
:- CTERelationDef xxxx, false
: +- CTERelationRef xxxx, true, [c8#x], false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias w6
: +- Project [c7#x AS c6#x]
: +- Project [c7#x]
: +- SubqueryAlias w7
: +- CTERelationRef xxxx, true, [c7#x]
:- CTERelationDef xxxx, false
: +- CTERelationRef xxxx, true, [c7#x], false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias w5
: +- Project [c6#x AS c5#x]
: +- Project [c6#x]
: +- SubqueryAlias w6
: +- CTERelationRef xxxx, true, [c6#x]
:- CTERelationDef xxxx, false
: +- CTERelationRef xxxx, true, [c6#x], false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias w4
: +- Project [c5#x AS c4#x]
: +- Project [c5#x]
: +- SubqueryAlias w5
: +- CTERelationRef xxxx, true, [c5#x]
:- CTERelationDef xxxx, false
: +- CTERelationRef xxxx, true, [c5#x], false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias w3
: +- Project [c4#x AS c3#x]
: +- Project [c4#x]
: +- SubqueryAlias w4
: +- CTERelationRef xxxx, true, [c4#x]
:- CTERelationDef xxxx, false
: +- CTERelationRef xxxx, true, [c4#x], false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias w2
: +- Project [c3#x AS c2#x]
: +- Project [c3#x]
: +- SubqueryAlias w3
: +- CTERelationRef xxxx, true, [c3#x]
:- CTERelationDef xxxx, false
: +- CTERelationRef xxxx, true, [c3#x], false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias w1
: +- Project [c2#x AS c1#x]
: +- Project [c2#x]
: +- SubqueryAlias w2
: +- CTERelationRef xxxx, true, [c2#x]
: +- CTERelationRef xxxx, true, [c2#x], false
+- Project [c1#x]
+- SubqueryAlias w1
+- CTERelationRef xxxx, true, [c1#x]
+- CTERelationRef xxxx, true, [c1#x], false


-- !query
Expand Down Expand Up @@ -377,14 +377,14 @@ WITH same_name AS (SELECT 42)
SELECT * FROM same_name, (SELECT 10) AS same_name
-- !query analysis
WithCTE
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias same_name
: +- Project [42 AS 42#x]
: +- OneRowRelation
+- Project [42#x, 10#x]
+- Join Inner
:- SubqueryAlias same_name
: +- CTERelationRef xxxx, true, [42#x]
: +- CTERelationRef xxxx, true, [42#x], false
+- SubqueryAlias same_name
+- Project [10 AS 10#x]
+- OneRowRelation
Expand Down Expand Up @@ -417,13 +417,13 @@ WITH q AS (SELECT 'foo' AS x)
SELECT x, typeof(x) FROM q
-- !query analysis
WithCTE
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias q
: +- Project [foo AS x#x]
: +- OneRowRelation
+- Project [x#x, typeof(x#x) AS typeof(x)#x]
+- SubqueryAlias q
+- CTERelationRef xxxx, true, [x#x]
+- CTERelationRef xxxx, true, [x#x], false


-- !query
Expand Down Expand Up @@ -477,27 +477,27 @@ SELECT * FROM
Project [y#x]
+- SubqueryAlias __auto_generated_subquery_name
+- WithCTE
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias q
: +- Project [1 AS x#x]
: +- OneRowRelation
+- Project [(x#x + 1) AS y#x]
+- SubqueryAlias q
+- CTERelationRef xxxx, true, [x#x]
+- CTERelationRef xxxx, true, [x#x], false


-- !query
select (with q as (select 1 x) select * from q)
-- !query analysis
Project [scalar-subquery#x [] AS scalarsubquery()#x]
: +- WithCTE
: :- CTERelationDef xxxx, false
: :- CTERelationDef xxxx, false, false
: : +- SubqueryAlias q
: : +- Project [1 AS x#x]
: : +- OneRowRelation
: +- Project [x#x]
: +- SubqueryAlias q
: +- CTERelationRef xxxx, true, [x#x]
: +- CTERelationRef xxxx, true, [x#x], false
+- OneRowRelation


Expand All @@ -506,13 +506,13 @@ select 1 in (with q as (select 1) select * from q)
-- !query analysis
Project [1 IN (list#x []) AS (1 IN (listquery()))#x]
: +- WithCTE
: :- CTERelationDef xxxx, false
: :- CTERelationDef xxxx, false, false
: : +- SubqueryAlias q
: : +- Project [1 AS 1#x]
: : +- OneRowRelation
: +- Project [1#x]
: +- SubqueryAlias q
: +- CTERelationRef xxxx, true, [1#x]
: +- CTERelationRef xxxx, true, [1#x], false
+- OneRowRelation


Expand Down Expand Up @@ -547,11 +547,11 @@ from
T1 z
-- !query analysis
WithCTE
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias T1
: +- Project [1 AS a#x]
: +- OneRowRelation
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias T1
: +- Project [2 AS b#x]
: +- OneRowRelation
Expand All @@ -560,14 +560,14 @@ WithCTE
:- Join Inner
: :- SubqueryAlias x
: : +- SubqueryAlias T1
: : +- CTERelationRef xxxx, true, [a#x]
: : +- CTERelationRef xxxx, true, [a#x], false
: +- SubqueryAlias y
: +- Project [b#x]
: +- SubqueryAlias T1
: +- CTERelationRef xxxx, true, [b#x]
: +- CTERelationRef xxxx, true, [b#x], false
+- SubqueryAlias z
+- SubqueryAlias T1
+- CTERelationRef xxxx, true, [a#x]
+- CTERelationRef xxxx, true, [a#x], false


-- !query
Expand All @@ -578,15 +578,15 @@ from
(WITH TtTt as (select 3 c) select * from ttTT, `tttT_2`)
-- !query analysis
WithCTE
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias TTtt
: +- Project [1 AS a#x]
: +- OneRowRelation
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias tTTt_2
: +- Project [2 AS a#x]
: +- OneRowRelation
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias TtTt
: +- Project [3 AS c#x]
: +- OneRowRelation
Expand All @@ -595,9 +595,9 @@ WithCTE
+- Project [c#x, a#x]
+- Join Inner
:- SubqueryAlias ttTT
: +- CTERelationRef xxxx, true, [c#x]
: +- CTERelationRef xxxx, true, [c#x], false
+- SubqueryAlias tttT_2
+- CTERelationRef xxxx, true, [a#x]
+- CTERelationRef xxxx, true, [a#x], false


-- !query
Expand All @@ -607,13 +607,13 @@ from (select 1 x, 2 y) T
-- !query analysis
Project [scalar-subquery#x [x#x] AS scalarsubquery(x)#x]
: +- WithCTE
: :- CTERelationDef xxxx, false
: :- CTERelationDef xxxx, false, false
: : +- SubqueryAlias q
: : +- Project [outer(x#x)]
: : +- OneRowRelation
: +- Project [x#x]
: +- SubqueryAlias q
: +- CTERelationRef xxxx, true, [x#x]
: +- CTERelationRef xxxx, true, [x#x], false
+- SubqueryAlias T
+- Project [1 AS x#x, 2 AS y#x]
+- OneRowRelation
Expand All @@ -626,13 +626,13 @@ from (select 1 x, 2 y) T
-- !query analysis
Project [scalar-subquery#x [x#x && y#x] AS scalarsubquery(x, y)#x]
: +- WithCTE
: :- CTERelationDef xxxx, false
: :- CTERelationDef xxxx, false, false
: : +- SubqueryAlias q
: : +- Project [3 AS z#x]
: : +- OneRowRelation
: +- Project [((outer(x#x) + outer(y#x)) + z#x) AS ((outer(T.x) + outer(T.y)) + z)#x]
: +- SubqueryAlias q
: +- CTERelationRef xxxx, true, [z#x]
: +- CTERelationRef xxxx, true, [z#x], false
+- SubqueryAlias T
+- Project [1 AS x#x, 2 AS y#x]
+- OneRowRelation
Expand All @@ -644,20 +644,20 @@ select * from
(with q2 as (select * from q1) select * from q2)
-- !query analysis
WithCTE
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias q1
: +- Project [1 AS x#x]
: +- OneRowRelation
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias q2
: +- Project [x#x]
: +- SubqueryAlias q1
: +- CTERelationRef xxxx, true, [x#x]
: +- CTERelationRef xxxx, true, [x#x], false
+- Project [x#x]
+- SubqueryAlias __auto_generated_subquery_name
+- Project [x#x]
+- SubqueryAlias q2
+- CTERelationRef xxxx, true, [x#x]
+- CTERelationRef xxxx, true, [x#x], false


-- !query
Expand All @@ -666,20 +666,20 @@ select * from
(with q1 as (select x+1 from q1) select * from q1)
-- !query analysis
WithCTE
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias q1
: +- Project [1 AS x#x]
: +- OneRowRelation
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias q1
: +- Project [(x#x + 1) AS (x + 1)#x]
: +- SubqueryAlias q1
: +- CTERelationRef xxxx, true, [x#x]
: +- CTERelationRef xxxx, true, [x#x], false
+- Project [(x + 1)#x]
+- SubqueryAlias __auto_generated_subquery_name
+- Project [(x + 1)#x]
+- SubqueryAlias q1
+- CTERelationRef xxxx, true, [(x + 1)#x]
+- CTERelationRef xxxx, true, [(x + 1)#x], false


-- !query
Expand All @@ -706,7 +706,7 @@ with cte1 as (Select id as j from t)
select * from cte1 where j = (select max(j) from cte1 as cte2)
-- !query analysis
WithCTE
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias cte1
: +- Project [id#x AS j#x]
: +- SubqueryAlias t
Expand All @@ -720,9 +720,9 @@ WithCTE
: +- Aggregate [max(j#x) AS max(j)#x]
: +- SubqueryAlias cte2
: +- SubqueryAlias cte1
: +- CTERelationRef xxxx, true, [j#x]
: +- CTERelationRef xxxx, true, [j#x], false
+- SubqueryAlias cte1
+- CTERelationRef xxxx, true, [j#x]
+- CTERelationRef xxxx, true, [j#x], false


-- !query
Expand Down
Expand Up @@ -1019,15 +1019,15 @@ SELECT (SELECT sum(1) FROM T WHERE a = col OR upper(col)= 'Y')
FROM (SELECT null as col) as foo
-- !query analysis
WithCTE
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias T
: +- Project [1 AS a#x]
: +- OneRowRelation
+- Project [scalar-subquery#x [col#x && col#x] AS scalarsubquery(col, col)#xL]
: +- Aggregate [sum(1) AS sum(1)#xL]
: +- Filter ((a#x = cast(outer(col#x) as int)) OR (upper(cast(outer(col#x) as string)) = Y))
: +- SubqueryAlias T
: +- CTERelationRef xxxx, true, [a#x]
: +- CTERelationRef xxxx, true, [a#x], false
+- SubqueryAlias foo
+- Project [null AS col#x]
+- OneRowRelation
Expand Down
Expand Up @@ -817,12 +817,12 @@ FROM t1 FULL OUTER JOIN t2 USING (key)
WHERE t1.key NOT LIKE 'bb.%'
-- !query analysis
WithCTE
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias t1
: +- Project [key#x]
: +- SubqueryAlias t
: +- LocalRelation [key#x]
:- CTERelationDef xxxx, false
:- CTERelationDef xxxx, false, false
: +- SubqueryAlias t2
: +- Project [key#x]
: +- SubqueryAlias t
Expand All @@ -833,6 +833,6 @@ WithCTE
+- Project [coalesce(key#x, key#x) AS key#x, key#x, key#x, key#x]
+- Join FullOuter, (key#x = key#x)
:- SubqueryAlias t1
: +- CTERelationRef xxxx, true, [key#x]
: +- CTERelationRef xxxx, true, [key#x], false
+- SubqueryAlias t2
+- CTERelationRef xxxx, true, [key#x]
+- CTERelationRef xxxx, true, [key#x], false

0 comments on commit 206e9a8

Please sign in to comment.