Repository navigation
Commit c49cb46
fix(duckdb): route a zero-column source through the disclosed pandas fallback
The zero-column short-circuit ran ahead of the backend's fallback chain, so it
bypassed both `pandas_ingest_fallback_reason` and `_pandas_index_forces_fallback`.
Three consequences:
- A zero-column frame with a non-RangeIndex worked before this change (the index
guard routed it to pandas and the labels survived) and came back with a rebuilt
RangeIndex after it, silently dropping the labels and breaking the parity the
`native_config` fixture exists to enforce.
- `output_format="duckdb"` still raised, now a RuntimeError from
`_require_recorded_fallback`, since a materialized frame may stand in for a
native handle only after a fallback the report discloses.
- `rows_before=len(source)` is only meaningful for pandas: a zero-column
LazyFrame raised TypeError and a parquet path would have passed its character
count off as a row count.
A source DuckDB cannot register is an ingest limitation, so name it as one and
let the existing chain handle it. The pandas reference already keeps the rows and
the index on a zero-column frame, and the fallback is disclosed in the report and
still blocked by `fallback_policy="error"`.
Fixes #457
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 6b2d0a6 commit c49cb46
2 files changed
Lines changed: 43 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
164 | 157 | | |
165 | 158 | | |
166 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
61 | 97 | | |
62 | 98 | | |
63 | 99 | | |
| |||
0 commit comments