github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/opt/memo/testdata/stats/window (about) 1 exec-ddl 2 CREATE TABLE kv ( 3 k INT PRIMARY KEY, 4 v INT, 5 w INT, 6 f FLOAT, 7 d DECIMAL, 8 s STRING, 9 b BOOL, 10 FAMILY (k, v, w, f, b), 11 FAMILY (d), 12 FAMILY (s) 13 ) 14 ---- 15 16 build colstat=8 17 SELECT k, rank() OVER () FROM (SELECT * FROM kv LIMIT 10) 18 ---- 19 project 20 ├── columns: k:1(int!null) rank:8(int) 21 ├── cardinality: [0 - 10] 22 ├── stats: [rows=10, distinct(8)=10, null(8)=0] 23 ├── key: (1) 24 ├── fd: (1)-->(8) 25 └── window partition=() 26 ├── columns: k:1(int!null) v:2(int) w:3(int) f:4(float) d:5(decimal) s:6(string) b:7(bool) rank:8(int) 27 ├── cardinality: [0 - 10] 28 ├── stats: [rows=10, distinct(8)=10, null(8)=0] 29 ├── key: (1) 30 ├── fd: (1)-->(2-7) 31 ├── limit 32 │ ├── columns: k:1(int!null) v:2(int) w:3(int) f:4(float) d:5(decimal) s:6(string) b:7(bool) 33 │ ├── cardinality: [0 - 10] 34 │ ├── stats: [rows=10] 35 │ ├── key: (1) 36 │ ├── fd: (1)-->(2-7) 37 │ ├── scan kv 38 │ │ ├── columns: k:1(int!null) v:2(int) w:3(int) f:4(float) d:5(decimal) s:6(string) b:7(bool) 39 │ │ ├── stats: [rows=1000] 40 │ │ ├── key: (1) 41 │ │ ├── fd: (1)-->(2-7) 42 │ │ └── limit hint: 10.00 43 │ └── 10 [type=int] 44 └── windows 45 └── rank [as=rank:8, type=int]