Skip to content
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

coerce Arrow BigInt to Number #2164

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Sep 9, 2024

Ref. #2155 (review)

Note that in the case of DuckDB-Wasm, we default config.query.castBigIntToDouble to true, so we shouldn’t see BigInt in practice with DuckDB, but we might still see it when loading Arrow or Parquet files.

@mbostock mbostock requested a review from Fil September 9, 2024 15:14
@Fil
Copy link
Contributor

Fil commented Sep 9, 2024

Sounds good. I'll work on a unit test.

@Fil
Copy link
Contributor

Fil commented Sep 9, 2024

I've added a unit test, however it reveals some other issues. I'll comment inline.

return Plot.plot({
height: 500,
x: {percent: true, grid: true},
y: {domain: [1.3, 2.21]},
Copy link
Contributor

Choose a reason for hiding this comment

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

If you remove the y.domain here, the chart works in preview but crashes in node tests. I don't understand what the difference might be.

Copy link
Contributor

Choose a reason for hiding this comment

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

Capture d’écran 2024-09-09 à 19 39 39

This is how the chart looks like in preview. But it crashes in node. Is apache-arrow behaving differently in the browser?

Copy link
Contributor

Choose a reason for hiding this comment

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

OK the test is now fixed — I just don't use a file and generate the arrow structure on the fly.

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.

2 participants