I'm dealing with a dataset that contains number that are in the 10*6 to 10**80 scale. The value
column that holds this data is of string
type.
One of the common queries performed is a sum across the value
column, for 100,000+ rows. However, there are strict requirements on precision so the double conversion that Snowflake performs causes it to lose precision.
Is it possible to create a Java UDF that performs an aggregate sum in the select part of a query? I tried looking up the documentation and couldn't really find a good example. The closest thing I found was UDTFs but it doesn't look like I can call them in the select part of a query.
If not, if anyone knows of strategies to deal with datasets with numbers much larger than the database can handle while maintaining data accuracy, that would be really helpful too.