Open HamudeHomsi opened 1 month ago
Great idea!
I replicated the problem in https://jsfiddle.net/yb4fteas/
It seems to be the sanitiser that is blocking for the use of BigInt
Hello, i would like to work on this issue.
We are sanetising by converting to JSON and back. A solid regex that only runs on string would be much more efficient and solve this problem.
Thank you for assigning the issue. I made a test for this issue as instructed. Any tips on where and how to fix this?
hm. Not super sure where it is. You can try the old fashion and insert console.log close to all the places we call JSON.stringify - or you can try to recreate the problem using the code from my previous JSfiddle as that will throw the actual error providing you with a line
hey @mathiasrw @KamilStefanco Did this issue got resolved if not I would like to participate finding the solution, I would love to be assigned with this issue
I already submitted a pull request for this issue in #1981
Hello, SUM() and other aggr functions should also support
BigInt
data type besideNumber
. BigInt is part of JavaScript (since ES2020) and is increasingly important for handling large integers without loss of precision.bigint
then SUM() function should add them together. Possible solution: check thetypeof
of the first value and based on this, sum all values and return the result as the given type. Workaround: manually create an aggregate function:"node": "^18.x"
"alasql": "^4.5.1"
Where
this.database.exec("SELECT SUM(size) FROM myTable")
=> Error because it cannot add a bigint data type with a number data type.