Support arbitrary-precision numeric types

Moved from GitHub dgraph/2107

Posted by malzzz:

My use-case for dgraph deals almost exclusively with 256-bit uints. Are there any plans for bignum datatypes at any point in the future? If not, is there possibly a way to implement that myself as a plugin? There are some workarounds I can use, like storing raw representations as strings, but none of those are ideal, since they’d limit the range of possible queries. Thanks!

pawanrawal commented :

We may support them later but it’s not a priority right now since there isn’t enough demand for it. Adding support is non-trivial since Go doesn’t support these types natively.

srfrog commented :

Related: #926

manishrjain commented :

We can switch our implementations to this. Or, introduce a new type for arbitrary-precision numeric types:

https://golang.org/pkg/math/big/