ClickHouse/tests/queries/0_stateless/02227_union_match_by_name.reference
Azat Khuzhin 5af2967f65 Revert code in TreeRewriter for proper column order for UNION
It is not required after #44920, which has a proper fix that does this
in ExpressionAnalyzer.

This reverts commit d98336ad83.
Reverts: #37887

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-16 20:46:39 +01:00

41 lines
1.5 KiB
Plaintext

-- { echo }
EXPLAIN header = 1, optimize = 0 SELECT avgWeighted(x, y) FROM (SELECT NULL, 255 AS x, 1 AS y UNION ALL SELECT y, NULL AS x, 1 AS y);
Expression (Projection)
Header: avgWeighted(x, y) Nullable(Float64)
Expression (Before ORDER BY)
Header: avgWeighted(x, y) Nullable(Float64)
Aggregating
Header: avgWeighted(x, y) Nullable(Float64)
Expression (Before GROUP BY)
Header: x Nullable(UInt8)
y UInt8
Union
Header: x Nullable(UInt8)
y UInt8
Expression (Conversion before UNION)
Header: x Nullable(UInt8)
y UInt8
Expression (Projection)
Header: x UInt8
y UInt8
Expression (Before ORDER BY)
Header: 255 UInt8
1 UInt8
dummy UInt8
ReadFromStorage (SystemOne)
Header: dummy UInt8
Expression (Conversion before UNION)
Header: x Nullable(UInt8)
y UInt8
Expression (Projection)
Header: x Nullable(Nothing)
y UInt8
Expression (Before ORDER BY)
Header: 1 UInt8
NULL Nullable(Nothing)
dummy UInt8
ReadFromStorage (SystemOne)
Header: dummy UInt8
SELECT avgWeighted(x, y) FROM (SELECT NULL, 255 AS x, 1 AS y UNION ALL SELECT y, NULL AS x, 1 AS y);
255