exec-ddl
CREATE TABLE xy (x INT PRIMARY KEY, y INT)
----
TABLE xy
 ├── x int not null
 ├── y int
 └── INDEX primary
      └── x int not null

build
SELECT * FROM (VALUES (1, 2), (3, 4), (NULL, 5))
----
values
 ├── columns: column1:1(int) column2:2(int)
 ├── cardinality: [3 - 3]
 ├── prune: (1,2)
 ├── tuple [type=tuple{int, int}]
 │    ├── const: 1 [type=int]
 │    └── const: 2 [type=int]
 ├── tuple [type=tuple{int, int}]
 │    ├── const: 3 [type=int]
 │    └── const: 4 [type=int]
 └── tuple [type=tuple{int, int}]
      ├── null [type=unknown]
      └── const: 5 [type=int]

# Propagate outer columns.
build
SELECT (VALUES (x), (y+1)) FROM xy
----
project
 ├── columns: column1:4(int)
 ├── prune: (4)
 ├── scan xy
 │    ├── columns: x:1(int!null) y:2(int)
 │    ├── key: (1)
 │    ├── fd: (1)-->(2)
 │    ├── prune: (1,2)
 │    └── interesting orderings: (+1)
 └── projections
      └── subquery [type=int, outer=(1,2), correlated-subquery]
           └── max1-row
                ├── columns: column1:3(int)
                ├── outer: (1,2)
                ├── cardinality: [1 - 1]
                ├── key: ()
                ├── fd: ()-->(3)
                └── values
                     ├── columns: column1:3(int)
                     ├── outer: (1,2)
                     ├── cardinality: [2 - 2]
                     ├── prune: (3)
                     ├── tuple [type=tuple{int}]
                     │    └── variable: x [type=int]
                     └── tuple [type=tuple{int}]
                          └── plus [type=int]
                               ├── variable: y [type=int]
                               └── const: 1 [type=int]

# Single row.
build
SELECT * FROM (VALUES (1, 2))
----
values
 ├── columns: column1:1(int) column2:2(int)
 ├── cardinality: [1 - 1]
 ├── key: ()
 ├── fd: ()-->(1,2)
 ├── prune: (1,2)
 └── tuple [type=tuple{int, int}]
      ├── const: 1 [type=int]
      └── const: 2 [type=int]
