[JS] Better BigInt compatibility check
- Dominant language
- TypeScript
- Stars
- 112
- Forks
- 23
- Avg merge
- 21h 18m
- Merged PRs (30d)
- 8
Description
See: https://github.com/apache/arrow/pull/9110
Check for whether `BigInt64ArrayAvailable` and `BigUint64ArrayAvailable` are available, rather than just `BigIntAvailable`. Recent versions of JavaScriptCore/WebKit in Safari support `BigInt` but do not support `BigInt64Array`, and so anything that relies on `BigInt64Array` will fail despite `BigIntAvailable` being true.
The manifestation of this issue can be seen when trying to run the following within Safari on a table that contains bigints:
```java
RecordBatchJSONWriter.writeAll(table).toString(true)
message: "BigUint64Array is not available in this environment"
BigUint64ArrayUnavailableError
BigUint64ArrayUnavailable
bignumToString
bigNumsToStrings
generatorResume@[native code]
performIteration@[native code]
visitInt
visit
map@[native code]
recordBatchToJSON
close
finish
global code
```
See also: https://bugs.webkit.org/show_bug.cgi?id=190800
**Reporter**: [Diana Clarke](https://issues.apache.org/jira/browse/ARROW-11706) / @dianaclarke
#### PRs and other links:
- [GitHub Pull Request apache/arrow#9110](https://github.com/apache/arrow/pull/9110)
**Note**: *This issue was originally created as [ARROW-11706](https://issues.apache.org/jira/browse/ARROW-11706). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Assessment
This issue has not been assessed yet.