Commit cfceb51
committed
PECO-1054 Expose Arrow batches to users, part two
Updated FetchableItems interface to return an instance of OutputType instead of a slice of output type.
Created interfaces SparkArrowBatch and SparkArrowRecord and implementations of each. This also changed the 1:1 ratio of batch instances to arrow records. A SparkArrowBatch can contain multiple arrow records.
Created BatchIterator interface and implementation and switched arrowRowScanner to use BatchIterator instead of BatchLoader
Created RowValues interface and implementation as a container for the currently loaded values for a set of rows.
Updated the behaviour of fetchable items cloudURL and localBatch to de-serialize the arrow records as part of fetching, rather than carry around the raw bytes for later de-serialization. Also eliminated the cloud fetch code that was de-serializing the arrow batch then serializing each record individually to create one batch instance per record.
Removed chunkedByteReader and replaced with io.MultiReader
Normalized use of row number so that there is no need to track the index of the row in the current batch.
Signed-off-by: Raymond Cypher <raymond.cypher@databricks.com>1 parent f7c0286 commit cfceb51
15 files changed
Lines changed: 719 additions & 585 deletions
File tree
- internal
- fetcher
- rows
- arrowbased
- columnbased
- rowscanner
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 154 | + | |
158 | 155 | | |
159 | 156 | | |
160 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
0 commit comments