Fix: expression description in plan after lift up unioin optimization

This commit is contained in:
Igor Nikonov 2024-08-31 12:09:02 +00:00
parent e7f403a27e
commit a6145e5099
5 changed files with 18 additions and 18 deletions

View File

@ -21,7 +21,7 @@ Expression (Projection)
Union
Expression ((Before LIMIT BY + (Before ORDER BY + (Convert VIEW subquery result to VIEW table structure + (Materialize constants after VIEW subquery + (Projection + Before ORDER BY))))))
ReadFromSystemNumbers
Expression
Expression (Before LIMIT BY)
ReadFromRemote (Read from remote replica)
explain select distinct on (k1, k2) v from remote('127.{1,2}', view(select 1 k1, 2 k2, 3 v from numbers(2)), cityHash64(k1, k2)); -- optimized
Union
@ -96,7 +96,7 @@ Expression (Project names)
LimitBy
Expression ((Before LIMIT BY + (Projection + (Change column names to column identifiers + (Convert VIEW subquery result to VIEW table structure + (Materialize constants after VIEW subquery + (Project names + (Projection + (Change column names to column identifiers + (Project names + (Projection + Change column names to column identifiers)))))))))))
ReadFromSystemNumbers
Expression
Expression (Before LIMIT BY)
ReadFromRemote (Read from remote replica)
explain select distinct on (k1, k2) v from remote('127.{1,2}', view(select 1 k1, 2 k2, 3 v from numbers(2)), cityHash64(k1, k2)); -- optimized
Union

View File

@ -395,9 +395,9 @@ Expression ((Projection + Before ORDER BY))
Union
Expression ((Before ORDER BY + (Conversion before UNION + (Projection + Before ORDER BY))))
ReadFromStorage (SystemOne)
Expression (( + (Conversion before UNION + (Projection + Before ORDER BY))))
Expression ((Before ORDER BY + (Conversion before UNION + (Projection + Before ORDER BY))))
ReadFromStorage (SystemOne)
Expression (( + (Conversion before UNION + (Projection + Before ORDER BY))))
Expression ((Before ORDER BY + (Conversion before UNION + (Projection + Before ORDER BY))))
ReadFromStorage (SystemOne)
-- execute
Float64 9007199254740994
@ -427,9 +427,9 @@ Expression ((Projection + Before ORDER BY))
Union
Expression ((Before ORDER BY + (Conversion before UNION + (Projection + Before ORDER BY))))
ReadFromStorage (SystemOne)
Expression (( + (Conversion before UNION + (Projection + Before ORDER BY))))
Expression ((Before ORDER BY + (Conversion before UNION + (Projection + Before ORDER BY))))
ReadFromStorage (SystemOne)
Expression (( + (Conversion before UNION + (Projection + Before ORDER BY))))
Expression ((Before ORDER BY + (Conversion before UNION + (Projection + Before ORDER BY))))
ReadFromStorage (SystemOne)
-- execute
Nullable(Float64) 9007199254740994
@ -459,9 +459,9 @@ Expression ((Projection + Before ORDER BY))
Union
Expression ((Before ORDER BY + (Conversion before UNION + (Projection + Before ORDER BY))))
ReadFromStorage (SystemOne)
Expression (( + (Conversion before UNION + (Projection + Before ORDER BY))))
Expression ((Before ORDER BY + (Conversion before UNION + (Projection + Before ORDER BY))))
ReadFromStorage (SystemOne)
Expression (( + (Conversion before UNION + (Projection + Before ORDER BY))))
Expression ((Before ORDER BY + (Conversion before UNION + (Projection + Before ORDER BY))))
ReadFromStorage (SystemOne)
-- execute
Float64 9007199254740994

View File

@ -394,9 +394,9 @@ Expression ((Project names + Projection))
Union
Expression ((Before ORDER BY + (Projection + (Change column names to column identifiers + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
ReadFromStorage (SystemOne)
Expression (( + ( + ( + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
Expression ((Before ORDER BY + (Projection + (Change column names to column identifiers + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
ReadFromStorage (SystemOne)
Expression (( + ( + ( + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
Expression ((Before ORDER BY + (Projection + (Change column names to column identifiers + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
ReadFromStorage (SystemOne)
-- execute
Float64 9007199254740994
@ -426,9 +426,9 @@ Expression ((Project names + Projection))
Union
Expression ((Before ORDER BY + (Projection + (Change column names to column identifiers + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
ReadFromStorage (SystemOne)
Expression (( + ( + ( + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
Expression ((Before ORDER BY + (Projection + (Change column names to column identifiers + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
ReadFromStorage (SystemOne)
Expression (( + ( + ( + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
Expression ((Before ORDER BY + (Projection + (Change column names to column identifiers + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
ReadFromStorage (SystemOne)
-- execute
Nullable(Float64) 9007199254740994
@ -458,9 +458,9 @@ Expression ((Project names + Projection))
Union
Expression ((Before ORDER BY + (Projection + (Change column names to column identifiers + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
ReadFromStorage (SystemOne)
Expression (( + ( + ( + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
Expression ((Before ORDER BY + (Projection + (Change column names to column identifiers + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
ReadFromStorage (SystemOne)
Expression (( + ( + ( + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
Expression ((Before ORDER BY + (Projection + (Change column names to column identifiers + (Conversion before UNION + (Project names + (Projection + Change column names to column identifiers)))))))
ReadFromStorage (SystemOne)
-- execute
Float64 9007199254740994

View File

@ -53,7 +53,7 @@ Expression (Projection)
Distinct (Preliminary DISTINCT)
Expression (Before ORDER BY)
ReadFromSystemNumbers
Expression (( + Projection))
Expression ((Before ORDER BY + Projection))
Distinct
Distinct (Preliminary DISTINCT)
Expression (Before ORDER BY)
@ -536,7 +536,7 @@ Expression (Projection)
Distinct (Preliminary DISTINCT)
Expression (Before ORDER BY)
ReadFromSystemNumbers
Expression (( + Projection))
Expression ((Before ORDER BY + Projection))
Distinct
Distinct (Preliminary DISTINCT)
Expression (Before ORDER BY)

View File

@ -54,7 +54,7 @@ Expression (Project names)
Distinct (Preliminary DISTINCT)
Expression ((Projection + Change column names to column identifiers))
ReadFromSystemNumbers
Expression (( + ( + Project names)))
Expression ((Projection + (Change column names to column identifiers + Project names)))
Distinct (DISTINCT)
Distinct (Preliminary DISTINCT)
Expression ((Projection + Change column names to column identifiers))
@ -542,7 +542,7 @@ Expression (Project names)
Distinct (Preliminary DISTINCT)
Expression ((Projection + Change column names to column identifiers))
ReadFromSystemNumbers
Expression (( + ( + Project names)))
Expression ((Projection + (Change column names to column identifiers + Project names)))
Distinct (DISTINCT)
Distinct (Preliminary DISTINCT)
Expression ((Projection + Change column names to column identifiers))