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

     1  exec-ddl
     2  CREATE TABLE xyzs (x INT PRIMARY KEY, y INT, z FLOAT NOT NULL, s STRING, UNIQUE (s DESC, z))
     3  ----
     4  
     5  exec-ddl
     6  CREATE TABLE kuv (k INT PRIMARY KEY, u FLOAT, v STRING)
     7  ----
     8  
     9  build
    10  SELECT * FROM xyzs WHERE (SELECT v FROM kuv) = 'foo'
    11  ----
    12  select
    13   ├── columns: x:1(int!null) y:2(int) z:3(float!null) s:4(string)
    14   ├── key: (1)
    15   ├── fd: (1)-->(2-4), (3,4)~~>(1,2)
    16   ├── prune: (1-4)
    17   ├── interesting orderings: (+1) (-4,+3,+1)
    18   ├── scan xyzs
    19   │    ├── columns: x:1(int!null) y:2(int) z:3(float!null) s:4(string)
    20   │    ├── key: (1)
    21   │    ├── fd: (1)-->(2-4), (3,4)~~>(1,2)
    22   │    ├── prune: (1-4)
    23   │    └── interesting orderings: (+1) (-4,+3,+1)
    24   └── filters
    25        └── eq [type=bool, subquery]
    26             ├── subquery [type=string]
    27             │    └── max1-row
    28             │         ├── columns: v:7(string)
    29             │         ├── error: "more than one row returned by a subquery used as an expression"
    30             │         ├── cardinality: [0 - 1]
    31             │         ├── key: ()
    32             │         ├── fd: ()-->(7)
    33             │         └── project
    34             │              ├── columns: v:7(string)
    35             │              ├── prune: (7)
    36             │              └── scan kuv
    37             │                   ├── columns: k:5(int!null) u:6(float) v:7(string)
    38             │                   ├── key: (5)
    39             │                   ├── fd: (5)-->(6,7)
    40             │                   ├── prune: (5-7)
    41             │                   └── interesting orderings: (+5)
    42             └── const: 'foo' [type=string]