arquero icon indicating copy to clipboard operation
arquero copied to clipboard

BigInt check in Arrow profiler is breaking Svelte-kit / Vite builds

Open cristianvogel opened this issue 2 years ago • 3 comments

The one that causes problems is on line 104 https://github.com/uwdata/arquero/blob/master/src/arrow/encode/profiler.js

Changing target on Vite to es2020 isn't really viable for my project at least, and is difficult to do inside a svelt-kit config.

Is that BigInt support really necessary?

cristianvogel avatar Feb 08 '22 10:02 cristianvogel

I am seeing this as well.

marr avatar Sep 22 '22 15:09 marr

Sorry that this is causing issues. Is the crux of the issue the use of the ** exponentiation operator? Or something else? We don't explicitly use BigInt in the code, so any more detailed description of the error could help.

jheer avatar Sep 22 '22 17:09 jheer

HI. As you can read above from the 8 Feb, I have located the exact problem for you. In my local copy of the library, I remove this check and everything compiles fine. If you don't need it for the library , then perhaps try to safely remove the below, I think?

else if (p.bigints === valid) {
    const v = -p.min > p.max ? -p.min - 1n : p.max;
    return p.min < 0
      ? v < 2 ** 63 ? Type.Int64
        : error(`BigInt exceeds 64 bits: ${v}`)
      : p.max < 2 ** 64 ? Type.Uint64
        : error(`BigInt exceeds 64 bits: ${p.max}`);
  }

cristianvogel avatar Sep 22 '22 19:09 cristianvogel