Repository navigation
Commit 2087482
Audit the error kinds for consistency and for wraps that lose them
A pass over all 3183 tagged sites, with the compiler doing the parts a text
scan cannot.
Tags. 17 messages carried different kinds at different sites. The rule
that settles each: a slot or buffer count is an InvalidArgument, never a
type error; a child index nobody can satisfy is OutOfBounds, whether it is
phrased as "invalid child index" or "has no child"; a check that a kernel
produced the declared length is AssertionFailed; and metadata checks are
Serde. 42 sites move, including the row-kernel input checks that were
InvalidArgument in one file and AssertionFailed in the next, and the view
bounds checks in VarBinView whose messages say "out of bounds". Four sites
that arrived with the rebase get their kinds.
Wraps. A `.map_err(|e| vortex_err!(Kind: "...: {e}"))` around a call that
already returns a VortexError replaces its kind with the wrapper's guess
and nests its whole Display, backtrace included, inside the new message. No
text scan can tell those from the same shape around an io::Error, so a
throwaway build probed every such closure with a marker type whose
must_use warning fires only when the wrapped value is a VortexError. It
found 10: the three statistics conversions, DType and union-scalar
deserialization, a CUDA scan column name, and four panics in test
harnesses. Each now uses `with_context`, or the `vortex_panic!(err, "...")`
form, which keep the kind. STYLE.md now says to do that.
From impls. `From<ArrowError>` sent every Arrow failure to Other. Arrow's
variants say what went wrong, so each now maps to its kind: NotYetImplemented
to NotImplemented, ArithmeticOverflow and the three offset overflows to
Overflow, SchemaError to MismatchedTypes, IoError to Io, the file-format
variants to Serde, and a rejected cast, parse or argument to
InvalidArgument. `From<jiff::Error>` maps a date that does not exist or a
misused unit, which jiff exposes as `is_range` and `is_invalid_parameter`,
to InvalidArgument. Both keep the original error as the source.
case_when's `serialize` said Serde for what is an unimplemented operation;
it is NotImplemented.
Signed-off-by: Robert Kruszewski <github@robertk.io>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S7EtMqoZ91rrCCh9vS2yTm1 parent 58a9cd5 commit 2087482
53 files changed
Lines changed: 172 additions & 90 deletions
File tree
- encodings
- alp/src/alp
- bytebool/src
- decimal-byte-parts/src/decimal_byte_parts
- fastlanes/src
- bitpacking/vtable
- rle
- parquet-variant/src
- runend/src
- sparse/src
- zstd/src
- vortex-array/src
- aggregate_fn/fns
- nan_count
- null_count
- uncompressed_size_in_bytes
- arrays
- bool/vtable
- chunked/vtable
- piecewise_sequence
- varbinview
- varbin/vtable
- compute/conformance
- dtype/serde
- expr
- extension/tests
- scalar_fn
- fns
- binary
- unstable/row
- batch
- execute
- visitor
- scalar
- test_harness/trace
- vortex-arrow/src/executor
- vortex-bench/src
- vortex-cuda
- ffi/src
- src
- vortex-datafusion/src/convert
- vortex-duckdb/src/duckdb
- vortex-error
- src
- tests
- vortex-json/src
- vortex-layout/src/layouts
- flat
- list
- zoned
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
56 | 66 | | |
57 | 67 | | |
58 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
| 223 | + | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1537 | 1537 | | |
1538 | 1538 | | |
1539 | 1539 | | |
1540 | | - | |
| 1540 | + | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | 1543 | | |
| |||
0 commit comments