Commit 2258cad
committed
fix(query): relax decimal domain assertion to scale and precision
`statistics_to_domain` asserted that the persisted decimal scalar variant
matches the `data_kind()` derived from the current schema size. That is not
an invariant: statistics built from an external Parquet column or page index
carry the variant implied by the Parquet physical type, so a `Decimal128`
scalar can legitimately describe a precision-9 (`Decimal64`-kind) size.
The assertion broke `parquet_rs::prune_pages::test_basic`,
`prune_pages::test_decimal_in_list` and
`prune_row_groups::test_various_rg_scenarios`.
Keep only the invariants that hold - equal scale and a persisted precision no
wider than the current schema precision - and let the domain keep following
the scalar variant, as it did before precision widening became metadata-only.1 parent e9c1121 commit 2258cad
2 files changed
Lines changed: 34 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
328 | 335 | | |
329 | 336 | | |
330 | 337 | | |
331 | 338 | | |
332 | | - | |
333 | | - | |
| 339 | + | |
| 340 | + | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
149 | 174 | | |
150 | 175 | | |
151 | 176 | | |
| |||
0 commit comments