-
Couldn't load subscription status.
- Fork 3.9k
ARROW-4578: [JS] Ensure Float16 is zero-copy, add more native BigInt support #3653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3653 +/- ##
==========================================
+ Coverage 87.47% 90.33% +2.85%
==========================================
Files 627 74 -553
Lines 80413 5413 -75000
Branches 0 1225 +1225
==========================================
- Hits 70344 4890 -65454
+ Misses 9960 515 -9445
+ Partials 109 8 -101
Continue to review full report at Codecov.
|
|
This is great. Native BigInt support will get better and better and so having good support for it in Arrow is great. |
c9613b2 to
7b96b5f
Compare
6350e9e to
2557277
Compare
|
👍 I also appreciate you looking out for firefox users and handling the case where BigInt is not supported Can you rebase now that #3634 is merged? |
… columns by index
…ment extraction util fns
…ible, and accept Iterable<number>
…() and toFloat64Array() methods instead
2557277 to
69ee6f7
Compare
|
@TheNeuralBit ok rebase is done. everything looks alright to me, let me know if you notice anything weird though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
This started as a continuation of #3634, but grew enough to deserve its own PR. I've made a PR to my own fork that highlights just the changes here: trxcllnt#8. I'll rebase this PR after #3634 is merged so only these changes are included.
This PR reverts the behavior of
Float16Vector#toArray()back to returning a zero-copy slice of the underlyingUint16Arraydata, and exposes the copying behavior via newtoFloat32Array()andtoFloat64Array()methods.Float16Array.from()will also convert any incoming 32 or 64-bit floats to Uint16s if necessary.It also adds tighter integration with the new
BigInt,BigInt64Array, andBigUint64Arrayprimitives (if available):BigIntto convert/stringify i64s/u64sBigInttype in element comparator andindexOf()toBigInt64Array()andtoBigUint64Array()methods toInt64VectorandUint64Vector, respectively0.4.0 added support for basic conversion to the native
BigIntwhen available, but would only create positiveBigInts, and was slower than necessary. This PR uses the native Arrays to create the BigInts, so we should see some speed ups there. Ex:JIRAs associated with this PR are: