Skip to content

Commit

Permalink
update planner test
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <[email protected]>
  • Loading branch information
wangrunji0408 committed Dec 5, 2024
1 parent 39bec04 commit f962d98
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
12 changes: 6 additions & 6 deletions tests/planner_test/count.planner.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ explain select count(*) from t
/*
Projection
├── exprs:ref
│ └── rowcount
├── cost: 1.13
│ └── count(*)_4
├── cost: 1.23
├── rows: 1
└── Agg { aggs: [ rowcount ], cost: 1.11, rows: 1 }
└── Agg { aggs: [ count(*)_4 ], cost: 1.21, rows: 1 }
└── Scan { table: t, list: [], filter: true, cost: 0, rows: 1 }
*/

Expand All @@ -18,12 +18,12 @@ explain select count(*) + 1 from t
Projection
├── exprs:+
│ ├── lhs:ref
│ │ └── rowcount
│ │ └── count(*)_4
│ ├── rhs: 1
├── cost: 1.33
├── cost: 1.4300001
├── rows: 1
└── Agg { aggs: [ rowcount ], cost: 1.11, rows: 1 }
└── Agg { aggs: [ count(*)_4 ], cost: 1.21, rows: 1 }
└── Scan { table: t, list: [], filter: true, cost: 0, rows: 1 }
*/

56 changes: 28 additions & 28 deletions tests/planner_test/tpch.planner.sql
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ Projection
│ │ │ └── l_discount
│ └── ref
│ └── rowcount
├── cost: 70266880
│ └── count(*)_19
├── cost: 70566940
├── rows: 100
└── Order { by: [ l_returnflag, l_linestatus ], cost: 70266840, rows: 100 }
└── Order { by: [ l_returnflag, l_linestatus ], cost: 70566904, rows: 100 }
└── HashAgg
├── keys: [ l_returnflag, l_linestatus ]
├── aggs:
Expand All @@ -184,8 +184,8 @@ Projection
│ │ └── l_discount
│ ├── count
│ │ └── l_discount
│ └── rowcount
├── cost: 70265070
│ └── count(*)_19
├── cost: 70565140
├── rows: 100
└── Projection
├── exprs: [ l_quantity, l_extendedprice, l_discount, l_tax, l_returnflag, l_linestatus ]
Expand Down Expand Up @@ -682,11 +682,11 @@ Projection
├── exprs:
│ ┌── o_orderpriority
│ └── ref
│ └── rowcount
├── cost: 35742960
│ └── count(*)_12
├── cost: 35761710
├── rows: 10
└── Order { by: [ o_orderpriority ], cost: 35742960, rows: 10 }
└── HashAgg { keys: [ o_orderpriority ], aggs: [ rowcount ], cost: 35742904, rows: 10 }
└── Order { by: [ o_orderpriority ], cost: 35761710, rows: 10 }
└── HashAgg { keys: [ o_orderpriority ], aggs: [ count(*)_12 ], cost: 35761656, rows: 10 }
└── Projection { exprs: [ o_orderpriority ], cost: 35712024, rows: 187500 }
└── HashJoin
├── type: semi
Expand Down Expand Up @@ -1952,26 +1952,26 @@ Projection
│ │ └── count
│ │ └── o_orderkey
│ └── ref
│ └── rowcount
├── cost: 10053795
│ └── count(*)_46
├── cost: 10053796
├── rows: 10
└── Order
├── by:
│ ┌── desc
│ │ └── ref
│ │ └── rowcount
│ │ └── count(*)_46
│ └── desc
│ └── ref
│ └── count
│ └── o_orderkey
├── cost: 10053795
├── cost: 10053796
├── rows: 10
└── HashAgg
├── keys:ref
│ └── count
│ └── o_orderkey
├── aggs: [ rowcount ]
├── cost: 10053740
├── aggs: [ count(*)_46 ]
├── cost: 10053741
├── rows: 10
└── Projection
├── exprs:
Expand Down Expand Up @@ -2204,15 +2204,15 @@ Projection
│ ├── p_type
│ ├── p_size
│ └── ref
│ └── count-distinct
│ └── count_distinct
│ └── ps_suppkey
├── cost: 9952286
├── rows: 1000
└── Order
├── by:
│ ┌── desc
│ │ └── ref
│ │ └── count-distinct
│ │ └── count_distinct
│ │ └── ps_suppkey
│ ├── p_brand
│ ├── p_type
Expand All @@ -2221,7 +2221,7 @@ Projection
├── rows: 1000
└── HashAgg
├── keys: [ p_brand, p_type, p_size ]
├── aggs:count-distinct
├── aggs:count_distinct
│ └── ps_suppkey
├── cost: 9938269
├── rows: 1000
Expand Down Expand Up @@ -2961,20 +2961,20 @@ Projection
├── exprs:
│ ┌── s_name
│ └── ref
│ └── rowcount
├── cost: 124247200
│ └── count(*)_52
├── cost: 124265950
├── rows: 10
└── TopN
├── limit: 100
├── offset: 0
├── order_by:
│ ┌── desc
│ │ └── ref
│ │ └── rowcount
│ │ └── count(*)_52
│ └── s_name
├── cost: 124247200
├── cost: 124265950
├── rows: 10
└── HashAgg { keys: [ s_name ], aggs: [ rowcount ], cost: 124247144, rows: 10 }
└── HashAgg { keys: [ s_name ], aggs: [ count(*)_52 ], cost: 124265896, rows: 10 }
└── Projection { exprs: [ s_name ], cost: 124216260, rows: 187537.97 }
└── HashJoin
├── type: semi
Expand Down Expand Up @@ -3120,25 +3120,25 @@ Projection
│ ┌── ref
│ │ └── Substring { str: c_phone, start: 1, length: 2 }
│ ├── ref
│ │ └── rowcount
│ │ └── count(*)_95
│ └── ref
│ └── sum
│ └── c_acctbal
├── cost: 4399655
├── cost: 4403405
├── rows: 10
└── Order
├── by:ref
│ └── Substring { str: c_phone, start: 1, length: 2 }
├── cost: 4399654.5
├── cost: 4403404.5
├── rows: 10
└── HashAgg
├── keys:ref
│ └── Substring { str: c_phone, start: 1, length: 2 }
├── aggs:
│ ┌── rowcount
│ ┌── count(*)_95
│ └── sum
│ └── c_acctbal
├── cost: 4399590
├── cost: 4403340
├── rows: 10
└── Projection
├── exprs: [ Substring { str: c_phone, start: 1, length: 2 }, c_acctbal ]
Expand Down

0 comments on commit f962d98

Please sign in to comment.