github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/opt/memo/testdata/logprops/values (about)

     1  exec-ddl
     2  CREATE TABLE xy (x INT PRIMARY KEY, y INT)
     3  ----
     4  
     5  build
     6  SELECT * FROM (VALUES (1, 2), (3, 4), (NULL, 5))
     7  ----
     8  values
     9   ├── columns: column1:1(int) column2:2(int!null)
    10   ├── cardinality: [3 - 3]
    11   ├── prune: (1,2)
    12   ├── tuple [type=tuple{int, int}]
    13   │    ├── const: 1 [type=int]
    14   │    └── const: 2 [type=int]
    15   ├── tuple [type=tuple{int, int}]
    16   │    ├── const: 3 [type=int]
    17   │    └── const: 4 [type=int]
    18   └── tuple [type=tuple{int, int}]
    19        ├── cast: INT8 [type=int]
    20        │    └── null [type=unknown]
    21        └── const: 5 [type=int]
    22  
    23  build
    24  SELECT * FROM (VALUES (1, 2), (3, 4), (5, 6))
    25  ----
    26  values
    27   ├── columns: column1:1(int!null) column2:2(int!null)
    28   ├── cardinality: [3 - 3]
    29   ├── prune: (1,2)
    30   ├── tuple [type=tuple{int, int}]
    31   │    ├── const: 1 [type=int]
    32   │    └── const: 2 [type=int]
    33   ├── tuple [type=tuple{int, int}]
    34   │    ├── const: 3 [type=int]
    35   │    └── const: 4 [type=int]
    36   └── tuple [type=tuple{int, int}]
    37        ├── const: 5 [type=int]
    38        └── const: 6 [type=int]
    39  
    40  build
    41  SELECT * FROM (VALUES (NULL, 2), (3, NULL), (5, 6))
    42  ----
    43  values
    44   ├── columns: column1:1(int) column2:2(int)
    45   ├── cardinality: [3 - 3]
    46   ├── prune: (1,2)
    47   ├── tuple [type=tuple{int, int}]
    48   │    ├── cast: INT8 [type=int]
    49   │    │    └── null [type=unknown]
    50   │    └── const: 2 [type=int]
    51   ├── tuple [type=tuple{int, int}]
    52   │    ├── const: 3 [type=int]
    53   │    └── cast: INT8 [type=int]
    54   │         └── null [type=unknown]
    55   └── tuple [type=tuple{int, int}]
    56        ├── const: 5 [type=int]
    57        └── const: 6 [type=int]
    58  
    59  # Propagate outer columns.
    60  build
    61  SELECT (VALUES (x), (y+1)) FROM xy
    62  ----
    63  project
    64   ├── columns: column1:4(int)
    65   ├── prune: (4)
    66   ├── scan xy
    67   │    ├── columns: x:1(int!null) y:2(int)
    68   │    ├── key: (1)
    69   │    ├── fd: (1)-->(2)
    70   │    ├── prune: (1,2)
    71   │    └── interesting orderings: (+1)
    72   └── projections
    73        └── subquery [as=column1:4, type=int, outer=(1,2), correlated-subquery]
    74             └── max1-row
    75                  ├── columns: column1:3(int)
    76                  ├── error: "more than one row returned by a subquery used as an expression"
    77                  ├── outer: (1,2)
    78                  ├── cardinality: [1 - 1]
    79                  ├── key: ()
    80                  ├── fd: ()-->(3)
    81                  └── values
    82                       ├── columns: column1:3(int)
    83                       ├── outer: (1,2)
    84                       ├── cardinality: [2 - 2]
    85                       ├── prune: (3)
    86                       ├── tuple [type=tuple{int}]
    87                       │    └── variable: x:1 [type=int]
    88                       └── tuple [type=tuple{int}]
    89                            └── plus [type=int]
    90                                 ├── variable: y:2 [type=int]
    91                                 └── const: 1 [type=int]
    92  
    93  # Single row.
    94  build
    95  SELECT * FROM (VALUES (1, 2))
    96  ----
    97  values
    98   ├── columns: column1:1(int!null) column2:2(int!null)
    99   ├── cardinality: [1 - 1]
   100   ├── key: ()
   101   ├── fd: ()-->(1,2)
   102   ├── prune: (1,2)
   103   └── tuple [type=tuple{int, int}]
   104        ├── const: 1 [type=int]
   105        └── const: 2 [type=int]