Commit b935783
authored
* udtf: fix UdtfExec invariant vec lengths to match children count
`UdtfExec::children()` reports one child (the inner plan), but
`maintains_input_order()`, `required_input_ordering()`,
`required_input_distribution()`, and `benefits_from_input_partitioning()`
all returned empty Vecs, violating the DataFusion ExecutionPlan contract
that these vectors must have one entry per child.
When `UdtfExec` got composed under another plan (e.g. `rrf(text_search(...),
vector_search(...))` without an explicit `join_key`), an optimizer pass
invoked `check_default_invariants` and the query failed with:
Internal error: Assertion failed: actual_len == children_len
(left: 0, right: 1): UdtfExec::maintains_input_order returned Vec with
incorrect size: 0 != 1.
Since `UdtfExec::execute()` delegates straight to the inner plan, the
correct values are: `maintains_input_order = [true]`,
`benefits_from_input_partitioning = [false]`, `required_input_ordering = [None]`,
`required_input_distribution = [UnspecifiedDistribution]`.
Add a regression test that builds a UdtfExec and asserts both the per-method
Vec lengths and `check_invariants` itself.
Fixes spiceai#10951
* cayenne: invalidate scan_file_statistics cache after position-based delete
The position-based delete path updates the per-file deletion bitmap in
`cached_deleted_row_ids` but did not invalidate the per-file
`scan_file_statistics` cache that `CayenneTableProvider::list_files_for_snapshot_scan`
populates from `infer_stats`. Because `infer_stats` applies the
`VortexAccessPlanProvider::adjust_statistics` hook at the time it runs, the
cached entry froze the row count as of the *previous* delete. The next
`COUNT(*)` (or any other stats-driven query) hit the cache and returned the
stale count — even though the deletion bitmap itself was up to date.
Also keep the `cayenne::metastore::sqlite` docblock backtick fix (`SQLite`)
that the trunk lint failure pointed out — clippy::doc_markdown was failing
on that line under `clippy::pedantic`.
`PkKeysetInvalidatingDeletionSink` already wraps every `delete_using_deletion_vectors`
sink, so dropping the cache there covers every position-based deletion path
without touching the position-based sink internals. PK-strategy callers also
flow through this sink — clearing for them is harmless because they don't
populate the access-plan stats path.
1 parent d1ec339 commit b935783
3 files changed
Lines changed: 70 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1485 | 1485 | | |
1486 | 1486 | | |
1487 | 1487 | | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
1488 | 1494 | | |
1489 | 1495 | | |
1490 | 1496 | | |
| |||
6178 | 6184 | | |
6179 | 6185 | | |
6180 | 6186 | | |
| 6187 | + | |
| 6188 | + | |
| 6189 | + | |
| 6190 | + | |
| 6191 | + | |
| 6192 | + | |
| 6193 | + | |
| 6194 | + | |
| 6195 | + | |
| 6196 | + | |
6181 | 6197 | | |
6182 | 6198 | | |
6183 | 6199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
0 commit comments