Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix adjust_ndv #11890

Merged
merged 10 commits into from
Jun 27, 2023
2 changes: 1 addition & 1 deletion src/query/catalog/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ pub trait ColumnStatisticsProvider {
max.push(0);
}
}
for idx in (0..min.len()).rev() {
for idx in 0..min.len() {
min_value = min_value * 128 + min[idx] as u32;
max_value = max_value * 128 + max[idx] as u32;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ explain select * from t1 where s like 'abcd' order by s;
----
EvalScalar
├── expressions: [t1.s (#0)]
├── estimated rows: 1.00
├── estimated rows: 2.00
└── Sort
├── sort keys: [s ASC NULLS LAST]
├── estimated rows: 1.00
├── estimated rows: 2.00
└── Filter
├── filters: [t1.s (#0) = 'abcd']
├── estimated rows: 1.00
├── estimated rows: 2.00
└── TableScan
├── table: default.default.t1
├── read rows: 4
Expand Down
12 changes: 6 additions & 6 deletions tests/sqllogictests/suites/tpch/queries.test
Original file line number Diff line number Diff line change
Expand Up @@ -1224,13 +1224,13 @@ limit 5;
----
HashJoin: INNER
├── Build
│ └── Scan: default.tpch.lineitem, rows: 600572
│ └── HashJoin: INNER
│ ├── Build
│ │ └── Scan: default.tpch.customer, rows: 15000
│ └── Probe
│ └── Scan: default.tpch.orders, rows: 150000
└── Probe
└── HashJoin: INNER
├── Build
│ └── Scan: default.tpch.customer, rows: 15000
└── Probe
└── Scan: default.tpch.orders, rows: 150000
└── Scan: default.tpch.lineitem, rows: 600572

# Q4
query I
Expand Down