asfimport opened a new issue, #100:
URL: https://github.com/apache/arrow-js/issues/100
I have table with a column, let’s call the column c. c.type returns Decimal
{scale: 3, precision: 12}. c.get(0) returns [519500, 0, 0, 0]. I know the value
should be 519.5. After much digging, I found that the value is actually an
arrow “big number”
(https://github.com/apache/arrow/blob/ccdbbe3b765d4df9b2b91270a69ad78a086f2d77/js/src/util/bn.ts),
so it has a valueOf function which returns 519500 (with the obvious caveat
that it’ll overflow if the number is more than 53-bits). I could divide that by
10^scale from c.type to get 519.5. Is there some easier way to do that?
Filed by [email protected]
**Reporter**: [Dominik
Moritz](https://issues.apache.org/jira/browse/ARROW-13099) / @domoritz
<sub>**Note**: *This issue was originally created as
[ARROW-13099](https://issues.apache.org/jira/browse/ARROW-13099). Please see
the [migration documentation](https://github.com/apache/arrow/issues/14542) for
further details.*</sub>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]