Commits


ptaylor authored and Wes McKinney committed c8d97fa92bb
ARROW-2650: [JS] Implement Unions Still need to add Unions to the integration tests, but I validated this locally with the [JSON file](https://github.com/icexelloss/arrow/blob/2d6d41dbb041dbee06131b3f94a3fae4e0a90fd2/integration/data/union.json) from #987 and it seems to work: ```sh $ ./bin/json-to-arrow.js -j ./test/data/json/union.json -a ./test/data/union-file.arrow $ cat ./test/data/union-file.arrow | ./bin/file-to-stream.js > ./test/data/union-stream.arrow $ cat ./test/data/union-file.arrow | node ./targets/apache-arrow/bin/arrow2csv.js "row_id" | "union: Union<Int32 | Int64>" 0 | 0 1 | [1,0] 2 | 2 3 | [3,0] 4 | 4 5 | [5,0] 6 | 6 7 | [7,0] 8 | 8 9 | [9,0] $ cat ./test/data/union-stream.arrow | node ./targets/apache-arrow/bin/arrow2csv.js "row_id" | "union: Union<Int32 | Int64>" 0 | 0 1 | [1,0] 2 | 2 3 | [3,0] 4 | 4 5 | [5,0] 6 | 6 7 | [7,0] 8 | 8 9 | [9,0] ``` Author: ptaylor <paul.e.taylor@me.com> Closes #2092 from trxcllnt/js-finish-unions and squashes the following commits: 9b199c39 <ptaylor> finish implementing unions in the JS reader 953232c0 <ptaylor> write schema metadata