Commit 8b7b394
committed
fix: compose successive batch_slice_columns calls (#186)
batch_slice_columns memoized a single index set for the whole import, so a
second call reused the first call's column positions against already-sliced
rows — corrupting values instead of narrowing further (e.g. the name column
received the last_name).
Reset the working headers to the parsed source set at the start of each batch,
so each call computes indices from the current headers and successive calls
narrow the previous call's result. @source_headers holds the complete parsed
header row; @headers is its per-batch working copy. Cover successive calls
across one and multiple batches.1 parent 72ed02b commit 8b7b394
2 files changed
Lines changed: 58 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
97 | 88 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
102 | 94 | | |
103 | 95 | | |
104 | 96 | | |
| |||
129 | 121 | | |
130 | 122 | | |
131 | 123 | | |
132 | | - | |
133 | | - | |
| 124 | + | |
| 125 | + | |
134 | 126 | | |
135 | 127 | | |
136 | 128 | | |
137 | 129 | | |
138 | 130 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
143 | 136 | | |
144 | 137 | | |
145 | 138 | | |
| |||
148 | 141 | | |
149 | 142 | | |
150 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
151 | 147 | | |
152 | 148 | | |
153 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
659 | 699 | | |
660 | 700 | | |
661 | 701 | | |
| |||
0 commit comments