forked from MaterializeInc/materialize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgithub-19290.slt
47 lines (40 loc) · 1.42 KB
/
github-19290.slt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0.
# Regression test for #19290.
statement ok
CREATE SOURCE tpch
FROM LOAD GENERATOR TPCH (SCALE FACTOR 0.00001)
FOR ALL TABLES
WITH (SIZE = '1');
query T multiline
EXPLAIN PHYSICAL PLAN FOR
SELECT DISTINCT ON(l_linenumber) l_linenumber, l_discount
FROM lineitem
ORDER BY l_linenumber, l_orderkey;
----
Explained Query:
Finish order_by=[#3 asc nulls_last, #0 asc nulls_last] output=[#3, #6]
TopK::MonotonicTop1 group_by=[#3] order_by=[#0 asc nulls_last] must_consolidate
Get::PassArrangements materialize.public.lineitem
raw=true
EOF
statement ok
SET transaction_isolation = 'serializable'
query T multiline
EXPLAIN PHYSICAL PLAN FOR
SELECT DISTINCT ON(l_linenumber) l_linenumber, l_discount
FROM lineitem
ORDER BY l_linenumber, l_orderkey;
----
Explained Query:
Finish order_by=[#3 asc nulls_last, #0 asc nulls_last] output=[#3, #6]
TopK::MonotonicTop1 group_by=[#3] order_by=[#0 asc nulls_last] must_consolidate
Get::PassArrangements materialize.public.lineitem
raw=true
EOF