Skip to content

Conversation

@trxcllnt
Copy link
Contributor

Still need to add Unions to the integration tests, but I validated this locally with the JSON file from #987 and it seems to work:

$ ./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]

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@cdacb09). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2092   +/-   ##
=========================================
  Coverage          ?   86.33%           
=========================================
  Files             ?      230           
  Lines             ?    40297           
  Branches          ?        0           
=========================================
  Hits              ?    34791           
  Misses            ?     5506           
  Partials          ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cdacb09...9b199c3. Read the comment docs.

Copy link
Member

@wesm wesm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. For the record, I continue to be amazed that you're able to build this library effectively while writing few or no unit tests to accompany patches. I try my best not to lecture about software engineering, but without more tests it's going to be insanely risky to ever perform significant refactoring on this code. Any refactor could easily introduce unknown bugs.

@wesm wesm closed this in c8d97fa Jul 4, 2018
@wesm
Copy link
Member

wesm commented Jul 4, 2018

Years ago I saw Uncle Bob's talk "What killed Smalltalk could kill Ruby, too" and I have taken the general idea to heart (without going full TDD; I tend to write unit tests while writing the implementation, rather than before): https://www.youtube.com/watch?v=YX3iRjKj7C0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants