ClickHouse/tests/queries/0_stateless/02227_union_match_by_name.reference
2024-02-22 17:44:41 +01:00

47 lines
1.9 KiB
Plaintext

-- { echoOn }
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 (Project names)
Header: avgWeighted(x, y) Nullable(Float64)
Expression (Projection)
Header: avgWeighted(__table1.x, __table1.y) Nullable(Float64)
Aggregating
Header: avgWeighted(__table1.x, __table1.y) Nullable(Float64)
Expression (Before GROUP BY)
Header: __table1.x Nullable(UInt8)
__table1.y UInt8
Expression (Change column names to column identifiers)
Header: __table1.x Nullable(UInt8)
__table1.y UInt8
Union
Header: x Nullable(UInt8)
y UInt8
Expression (Conversion before UNION)
Header: x Nullable(UInt8)
y UInt8
Expression (Project names)
Header: x UInt8
y UInt8
Expression (Projection)
Header: 255_UInt8 UInt8
1_UInt8 UInt8
Expression (Change column names to column identifiers)
Header: __table3.dummy UInt8
ReadFromStorage (SystemOne)
Header: dummy UInt8
Expression (Conversion before UNION)
Header: x Nullable(UInt8)
y UInt8
Expression (Project names)
Header: x Nullable(Nothing)
y UInt8
Expression (Projection)
Header: _CAST(NULL_Nullable(Nothing), \'Nullable(Nothing)\'_String) Nullable(Nothing)
1_UInt8 UInt8
Expression (Change column names to column identifiers)
Header: __table5.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