forked from MaterializeInc/materialize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
record.slt
44 lines (36 loc) · 1023 Bytes
/
record.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
# 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.
statement ok
CREATE TABLE t1 (a int, b int)
statement ok
INSERT INTO t1 values (1, 2)
query T multiline
EXPLAIN SELECT (record).f2 FROM (SELECT ROW(a, a) AS record FROM t1);
----
%0 =
| Get materialize.public.t1 (u1)
| Map #0
| Project (#2)
EOF
query T multiline
EXPLAIN SELECT record, (record).f2 FROM (SELECT ROW(a, a) AS record FROM t1);
----
%0 =
| Get materialize.public.t1 (u1)
| Map record_create(#0, #0), record_get[1](#2)
| Project (#2, #3)
EOF
query T multiline
EXPLAIN SELECT (COALESCE(record, ROW(NULL, NULL))).f2 FROM (SELECT ROW(a, a) AS record FROM t1)
----
%0 =
| Get materialize.public.t1 (u1)
| Map #0
| Project (#2)
EOF