apache / apache/arrow-js

[JS] Better BigInt compatibility check

Open
#102 1 comment 0 reactions 0 assignees View on GitHub
Type: enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.