Commit a3bb6a6
committed
[python] Re-apply dropped nested-leaf predicate after projection extraction
When a read projects a nested struct sub-field (e.g. mv.latest_version), the
read widens the projection to the full top-level column so per-file field-id
normalization applies, then extracts the leaf afterwards. The leaf path is
absent from the widened read fields, so SplitRead.__init__ dropped any
predicate referencing it (predicate_for_reader=None) and the filter was
silently lost -- every row was returned.
Re-evaluate the dropped predicate after extraction, where the flat columns
match the predicate fields: RawFileSplitRead (append-only / PK raw-convertible)
wraps the extracted batches with FilterRecordBatchReader; MergeFileSplitRead
(PK non raw-convertible) filters the extracted rows with FilterRecordReader,
rewriting indices into the flat output. The predicate is trimmed to the
projected columns first, so a filter on a non-projected column keeps the
existing drop semantics instead of referencing a missing column.1 parent b3c8c25 commit a3bb6a6
3 files changed
Lines changed: 99 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
727 | 743 | | |
728 | 744 | | |
729 | 745 | | |
| |||
743 | 759 | | |
744 | 760 | | |
745 | 761 | | |
| 762 | + | |
746 | 763 | | |
747 | 764 | | |
748 | 765 | | |
| |||
757 | 774 | | |
758 | 775 | | |
759 | 776 | | |
| 777 | + | |
760 | 778 | | |
761 | 779 | | |
762 | 780 | | |
| |||
855 | 873 | | |
856 | 874 | | |
857 | 875 | | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
858 | 891 | | |
859 | 892 | | |
860 | 893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| 588 | + | |
| 589 | + | |
588 | 590 | | |
589 | 591 | | |
590 | 592 | | |
| |||
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
196 | 213 | | |
197 | 214 | | |
198 | 215 | | |
| |||
245 | 262 | | |
246 | 263 | | |
247 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
248 | 283 | | |
249 | 284 | | |
250 | 285 | | |
251 | 286 | | |
252 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
253 | 302 | | |
254 | 303 | | |
255 | 304 | | |
| |||
301 | 350 | | |
302 | 351 | | |
303 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
304 | 368 | | |
305 | 369 | | |
306 | 370 | | |
| |||
0 commit comments