[ 
https://issues.apache.org/jira/browse/IGNITE-23340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Tupitsyn updated IGNITE-23340:
------------------------------------
    Description: 
* *BigDecimal* in Ignite 3 (in Java) can have precision up to 32767 (see 
[MAX_DECIMAL_PRECISION|https://github.com/apache/ignite-3/blob/main/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java#L100])
* .NET *decimal* has 28-29 digit precision

As a result, some values can't be represented at all (e.g. SQL query results, 
Java compute job results, etc), leaving the user in a dead end.

To solve this, we should introduce a custom type (*IgniteDecimal* or something 
like that), which will consist of unscaled *BigInteger* and *int scale*, with a 
conversion to and from *decimal*.

  was:
* *BigDecimal* in Ignite 3 (in Java) can have precision up to 32767 (see 
[MAX_DECIMAL_PRECISION|https://github.com/apache/ignite-3/blob/main/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java#L100])
* .NET *decimal* has 28-29 digit precision

As a result, some values can't be represented at all (e.g. SQL query results, 
Java compute job results, etc), leaving the user in a dead end.


> .NET: Some BigDecimal values can't be represented
> -------------------------------------------------
>
>                 Key: IGNITE-23340
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23340
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>            Priority: Major
>              Labels: ignite-3, important
>             Fix For: 3.0
>
>
> * *BigDecimal* in Ignite 3 (in Java) can have precision up to 32767 (see 
> [MAX_DECIMAL_PRECISION|https://github.com/apache/ignite-3/blob/main/modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java#L100])
> * .NET *decimal* has 28-29 digit precision
> As a result, some values can't be represented at all (e.g. SQL query results, 
> Java compute job results, etc), leaving the user in a dead end.
> To solve this, we should introduce a custom type (*IgniteDecimal* or 
> something like that), which will consist of unscaled *BigInteger* and *int 
> scale*, with a conversion to and from *decimal*.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to