Commit fc7a382
ARROW-2116: [JS] implement IPC writers
https://issues.apache.org/jira/browse/ARROW-2116
https://issues.apache.org/jira/browse/ARROW-2115
This PR represents a first pass at implementing the IPC writers for binary stream and file formats in JS.
I've also added scripts to do the `json-to-arrow`, `file-to-stream`, and `stream-to-file` steps of the integration tests. These scripts rely on a new feature in Node 10 (the next LTS version), so please update. My attempts to use a library to remain backwards-compatible with Node 9 were unsuccessful.
I've only done the APIs to serialize a preexisting Table to stream or file formats so far. We will want to refactor this soon to support end-to-end streaming.
Edit: Figured out why the integration tests weren't passing, fixed now 🥇
Author: ptaylor <paul.e.taylor@me.com>
Author: Paul Taylor <paul.e.taylor@me.com>
Author: lsb <leebutterman@gmail.com>
Closes apache#2035 from trxcllnt/js-buffer-writer and squashes the following commits:
261a864 <ptaylor> Merge branch 'master' into js-buffer-writer
917c2fc <ptaylor> test the ES5/UMD bundle in the integration tests
7a346dc <ptaylor> add a handy script for printing the alignment of buffers in a table
4594fe3 <ptaylor> align to 8-byte boundaries only
1a9864c <ptaylor> read message bodyLength from flatbuffer object
e34afaa <ptaylor> export the RecordBatchSerializer
b765b12 <ptaylor> speed up integration_test.py by only testing the JS source, not every compilation target
4ed6554 <ptaylor> Merge branch 'master' of https://github.com/apache/arrow into js-buffer-writer
f497f7a <ptaylor> measure maxColumnWidths across all recordBatches when printing a table
14e6b38 <ptaylor> cleanup: remove dead code
df43bc5 <ptaylor> make arrow2csv support streaming files from stdin, add rowsToString() method to RecordBatch
7924e67 <ptaylor> rename readNodeStream -> readStream, fromNodeStream -> fromReadableStream, add support for reading File format
efc7225 <ptaylor> fix perf tests
a06180b <ptaylor> don't run JS integration tests in src-only mode when --debug=true
ed85572 <ptaylor> fix instanceof ArrayBuffer in jest/node 10
2df1a4a <ptaylor> update google-closure-compiler, remove gcc-specific workarounds in the build
a6a7ab9 <ptaylor> put test tables into hoisted functions so it's easier to set breakpoints
a79334d <ptaylor> fix typo again after rebase
081fefc <ptaylor> remove bin from ts package.json
ccaf489 <ptaylor> remove stream-to-iterator
c0b88c2 <ptaylor> always write flatbuffer vectors
0be6de3 <ptaylor> use node v10.1.0 in travis
d4b8637 <ptaylor> add license headers
b52af25 <ptaylor> cleanup
3187732 <ptaylor> set bitmap alignment to 8 bytes if < 64 values
af9f4a8 <ptaylor> run integration tests in node 10.1
de81ac1 <ptaylor> Update JSTester to be an Arrow producer now too
832cc30 <ptaylor> add more js integration scripts for creating/converting arrow formats
263d06d <ptaylor> clean up js integration script
78cba38 <ptaylor> arrow2csv: support reading arrow streams from stdin
e75da13 <ptaylor> add support for reading streaming format via node streams
4e80851 <ptaylor> write correct recordBatch length
73a2fa9 <ptaylor> fix stream -> file, file -> stream, add tests
304e75d <ptaylor> fix magic string alignment in file reader, add file reader tests
402187e <ptaylor> add apache license headers
db02c1c <ptaylor> Add an integration test for binary writer
a242da8 <ptaylor> Add `Table.prototype.serialize` method to make ArrayBuffers from Tables
da0f457 <ptaylor> first pass at a working binary writer, only arrow stream format tested so far
508f4f8 <ptaylor> add getChildAt(n) methods to List and FixedSizeList Vectors to be more consistent with the other nested Vectors, make it easier to do the writer
a9d773d <ptaylor> move ValidityView into its own module, like ChunkedView is
85eb7ee <ptaylor> fix erroneous footer length check in reader
4333e54 <ptaylor> FileBlock constructor should accept Long | number, have public number fields
7fff99e <ptaylor> move IPC magic into its own module
d98e178 <ptaylor> add option to run gulp cmds with `-t src` to run jest against the `src` folder direct
aaec76b <ptaylor> fix @std/esm options for node10
18b9dd2 <lsb> Fix a typo
efb840f <Paul Taylor> fix typo
ae1f481 <Paul Taylor> align to 64-byte boundaries
c8ba1fe <Paul Taylor> don't write an empty buffer for NullVectors
43c671f <Paul Taylor> add Binary writer
6522cb0 <Paul Taylor> fix Data generics for FixedSizeList
ef1acc7 <Paul Taylor> read union buffers in the correct order
dc92b83 <Paul Taylor> fix typo1 parent 1d9d893 commit fc7a382
52 files changed
Lines changed: 2121 additions & 4101 deletions
File tree
- ci
- integration
- js
- bin
- gulp
- perf
- src
- bin
- fb
- ipc
- reader
- writer
- util
- vector
- test
- integration
- unit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1092 | 1092 | | |
1093 | 1093 | | |
1094 | 1094 | | |
1095 | | - | |
| 1095 | + | |
1096 | 1096 | | |
1097 | 1097 | | |
1098 | | - | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
1099 | 1103 | | |
1100 | 1104 | | |
1101 | 1105 | | |
1102 | | - | |
1103 | | - | |
| 1106 | + | |
| 1107 | + | |
1104 | 1108 | | |
1105 | 1109 | | |
1106 | 1110 | | |
1107 | 1111 | | |
1108 | 1112 | | |
1109 | 1113 | | |
1110 | 1114 | | |
1111 | | - | |
| 1115 | + | |
1112 | 1116 | | |
1113 | 1117 | | |
1114 | 1118 | | |
1115 | 1119 | | |
1116 | 1120 | | |
1117 | 1121 | | |
1118 | 1122 | | |
1119 | | - | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
1120 | 1131 | | |
1121 | 1132 | | |
1122 | | - | |
1123 | | - | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
1124 | 1141 | | |
1125 | 1142 | | |
1126 | 1143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
| 71 | + | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
| |||
101 | 99 | | |
102 | 100 | | |
103 | 101 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments