ClickHouse/tests/queries/0_stateless/01655_plan_optimizations.reference

149 lines
2.6 KiB
Plaintext
Raw Normal View History

Too many optimizations applied to query plan
Too many optimizations applied to query plan
2021-02-12 11:31:14 +00:00
> sipHash should be calculated after filtration
2021-01-19 13:35:26 +00:00
FUNCTION sipHash64
Filter column: equals
2021-02-12 11:31:14 +00:00
> sorting steps should know about limit
2021-01-19 13:35:26 +00:00
Limit 10
MergingSorted
Limit 10
MergeSorting
Limit 10
PartialSorting
Limit 10
2021-02-12 11:31:14 +00:00
-- filter push down --
> filter should be pushed down after aggregating
Aggregating
Filter
2021-02-17 16:54:37 +00:00
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
2021-02-12 11:31:14 +00:00
> filter should be pushed down after aggregating, column after aggregation is const
COLUMN Const(UInt8) -> notEquals(y, 0)
Aggregating
Filter
Filter
2021-02-17 16:54:37 +00:00
0 1 1
1 2 1
2 3 1
3 4 1
4 5 1
5 6 1
6 7 1
7 8 1
8 9 1
9 10 1
2021-02-12 11:31:14 +00:00
> one condition of filter should be pushed down after aggregating, other condition is aliased
Filter column
ALIAS notEquals(s, 4) :: 1 -> and(notEquals(y, 0), notEquals(s, 4))
Aggregating
Filter column: notEquals(y, 0)
2021-02-17 16:54:37 +00:00
0 1
1 2
2 3
3 4
5 6
6 7
7 8
8 9
9 10
2021-02-12 11:31:14 +00:00
> one condition of filter should be pushed down after aggregating, other condition is casted
Filter column
FUNCTION CAST(minus(s, 4) :: 1, UInt8 :: 3) -> and(notEquals(y, 0), minus(s, 4))
Aggregating
Filter column: notEquals(y, 0)
2021-02-17 16:54:37 +00:00
0 1
1 2
2 3
3 4
5 6
6 7
7 8
8 9
9 10
2021-02-12 11:31:14 +00:00
> one condition of filter should be pushed down after aggregating, other two conditions are ANDed
Filter column
2021-02-20 17:42:06 +00:00
FUNCTION and(minus(s, 8) :: 1, minus(s, 4) :: 2) -> and(notEquals(y, 0), minus(s, 8), minus(s, 4))
2021-02-12 11:31:14 +00:00
Aggregating
Filter column: notEquals(y, 0)
2021-02-17 16:54:37 +00:00
0 1
1 2
2 3
3 4
5 6
6 7
7 8
9 10
2021-02-12 11:31:14 +00:00
> two conditions of filter should be pushed down after aggregating and ANDed, one condition is aliased
Filter column
ALIAS notEquals(s, 8) :: 1 -> and(notEquals(y, 0), notEquals(s, 8), minus(y, 4))
Aggregating
2021-02-20 17:42:06 +00:00
Filter column: and(notEquals(y, 0), minus(y, 4))
2021-02-17 16:54:37 +00:00
0 1
1 2
2 3
4 5
5 6
6 7
7 8
9 10
2021-02-12 16:06:18 +00:00
> filter is split, one part is filtered before ARRAY JOIN
Filter column: and(notEquals(y, 2), notEquals(x, 0))
ARRAY JOIN x
Filter column: notEquals(y, 2)
2021-02-17 16:54:37 +00:00
1 3
> filter is pushed down before Distinct
Distinct
Distinct
Filter column: notEquals(y, 2)
0 0
0 1
1 0
1 1
> filter is pushed down before sorting steps
MergingSorted
MergeSorting
PartialSorting
Filter column: and(notEquals(x, 0), notEquals(y, 0))
1 2
1 1
2021-02-18 13:13:09 +00:00
> filter is pushed down before TOTALS HAVING and aggregating
TotalsHaving
Aggregating
Filter column: notEquals(y, 2)
0 12
1 15
3 10
0 37
> filter is pushed down before CreatingSets
CreatingSets
Filter
Filter
1
3
> one condition of filter is pushed down before LEFT JOIN
Join
Filter column: notEquals(number, 1)
Join
0 0
3 3
> one condition of filter is pushed down before INNER JOIN
Join
Filter column: notEquals(number, 1)
Join
3 3
> filter is pushed down before UNION
Union
Filter
Filter
2 3
2 3