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

     1  exec-ddl
     2  CREATE TABLE ab (a INT, b STRING)
     3  ----
     4  
     5  build
     6  CANCEL JOBS SELECT 1
     7  ----
     8  control-jobs (CANCEL)
     9   └── project
    10        ├── columns: "?column?":1!null
    11        ├── values
    12        │    └── ()
    13        └── projections
    14             └── 1 [as="?column?":1]
    15  
    16  build
    17  RESUME JOBS VALUES (1), (2), (3)
    18  ----
    19  control-jobs (RESUME)
    20   └── values
    21        ├── columns: column1:1!null
    22        ├── (1,)
    23        ├── (2,)
    24        └── (3,)
    25  
    26  build
    27  PAUSE JOBS SELECT a FROM ab ORDER BY b
    28  ----
    29  control-jobs (PAUSE)
    30   └── sort
    31        ├── columns: a:1  [hidden: b:2]
    32        ├── ordering: +2
    33        └── project
    34             ├── columns: a:1 b:2
    35             └── scan ab
    36                  └── columns: a:1 b:2 rowid:3!null
    37  
    38  build
    39  PAUSE JOB 1
    40  ----
    41  control-jobs (PAUSE)
    42   └── values
    43        ├── columns: column1:1!null
    44        └── (1,)
    45  
    46  build
    47  PAUSE JOBS SELECT 1.1
    48  ----
    49  error (42601): PAUSE JOBS data column 1 (job_id) must be of type int, not type decimal
    50  
    51  build
    52  CANCEL JOBS SELECT 1, 1
    53  ----
    54  error (42601): too many columns in CANCEL JOBS data
    55  
    56  build
    57  CANCEL SESSION 'foo'
    58  ----
    59  cancel-sessions
    60   └── values
    61        ├── columns: column1:1!null
    62        └── ('foo',)
    63  
    64  build
    65  CANCEL SESSIONS VALUES ('foo'), ('bar')
    66  ----
    67  cancel-sessions
    68   └── values
    69        ├── columns: column1:1!null
    70        ├── ('foo',)
    71        └── ('bar',)
    72  
    73  build
    74  CANCEL SESSIONS SELECT b FROM ab ORDER BY a
    75  ----
    76  cancel-sessions
    77   └── sort
    78        ├── columns: b:2  [hidden: a:1]
    79        ├── ordering: +1
    80        └── project
    81             ├── columns: a:1 b:2
    82             └── scan ab
    83                  └── columns: a:1 b:2 rowid:3!null
    84  
    85  build
    86  CANCEL SESSION 1
    87  ----
    88  error (42601): CANCEL SESSIONS data column 1 (session_id) must be of type string, not type int
    89  
    90  build
    91  CANCEL SESSIONS VALUES (1, 2)
    92  ----
    93  error (42601): too many columns in CANCEL SESSIONS data
    94  
    95  build
    96  CANCEL QUERY 'foo'
    97  ----
    98  cancel-queries
    99   └── values
   100        ├── columns: column1:1!null
   101        └── ('foo',)
   102  
   103  build
   104  CANCEL QUERIES VALUES ('foo'), ('bar')
   105  ----
   106  cancel-queries
   107   └── values
   108        ├── columns: column1:1!null
   109        ├── ('foo',)
   110        └── ('bar',)
   111  
   112  build
   113  CANCEL QUERIES SELECT b FROM ab ORDER BY a
   114  ----
   115  cancel-queries
   116   └── sort
   117        ├── columns: b:2  [hidden: a:1]
   118        ├── ordering: +1
   119        └── project
   120             ├── columns: a:1 b:2
   121             └── scan ab
   122                  └── columns: a:1 b:2 rowid:3!null
   123  
   124  build
   125  CANCEL QUERY 1
   126  ----
   127  error (42601): CANCEL QUERIES data column 1 (query_id) must be of type string, not type int
   128  
   129  build
   130  CANCEL QUERIES VALUES (1, 2)
   131  ----
   132  error (42601): too many columns in CANCEL QUERIES data
   133  
   134  build
   135  EXPORT INTO CSV 'nodelocal://0/foo' FROM SELECT * FROM ab
   136  ----
   137  export
   138   ├── columns: filename:4 rows:5 bytes:6
   139   ├── format: CSV
   140   ├── project
   141   │    ├── columns: a:1 b:2
   142   │    └── scan ab
   143   │         └── columns: a:1 b:2 rowid:3!null
   144   └── 'nodelocal://0/foo'
   145  
   146  build
   147  EXPORT INTO CSV 'nodelocal://0/foo' WITH 'foo', 'bar'='baz' FROM SELECT * FROM ab
   148  ----
   149  export
   150   ├── columns: filename:4 rows:5 bytes:6
   151   ├── format: CSV
   152   ├── project
   153   │    ├── columns: a:1 b:2
   154   │    └── scan ab
   155   │         └── columns: a:1 b:2 rowid:3!null
   156   ├── 'nodelocal://0/foo'
   157   └── k-v-options
   158        ├── k-v-options-item foo
   159        │    └── CAST(NULL AS STRING)
   160        └── k-v-options-item bar
   161             └── 'baz'
   162  
   163  build
   164  EXPORT INTO CSV 'nodelocal://0/foo' WITH 'foo' = $1 FROM SELECT * FROM ab
   165  ----
   166  export
   167   ├── columns: filename:4 rows:5 bytes:6
   168   ├── format: CSV
   169   ├── project
   170   │    ├── columns: a:1 b:2
   171   │    └── scan ab
   172   │         └── columns: a:1 b:2 rowid:3!null
   173   ├── 'nodelocal://0/foo'
   174   └── k-v-options
   175        └── k-v-options-item foo
   176             └── $1