[
https://issues.apache.org/jira/browse/IGNITE-21743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Tupitsyn updated IGNITE-21743:
------------------------------------
Description:
Currently we use *as decimal* cast, which results in *scale=0*, truncating any
digits after the decimal point.
See ticket mention in *IgniteQueryExpressionVisitor* - we should specify scale
and precision when performing cast to decimal.
Blocked by IGNITE-21745 : .NET can't read small values with high scale.
was:
Details TBD
{code}
else if ((Nullable.GetUnderlyingType(expression.Type) ??
expression.Type) == typeof(decimal))
{
// Use max precision and scale when performing cast to achieve
expected behavior.
// Otherwise, zero scale leads to rounding.
ResultBuilder.Append(" as decimal(20, 10))");
}
{code}
Blocked by IGNITE-21745 : .NET can't read small values with high scale.
> .NET: LINQ: Cast to decimal loses precision
> -------------------------------------------
>
> Key: IGNITE-21743
> URL: https://issues.apache.org/jira/browse/IGNITE-21743
> Project: Ignite
> Issue Type: Bug
> Components: platforms, thin client
> Affects Versions: 3.0.0-beta1
> Reporter: Pavel Tupitsyn
> Priority: Major
> Labels: .NET, LINQ, ignite-3
> Fix For: 3.0.0-beta2
>
>
> Currently we use *as decimal* cast, which results in *scale=0*, truncating
> any digits after the decimal point.
> See ticket mention in *IgniteQueryExpressionVisitor* - we should specify
> scale and precision when performing cast to decimal.
> Blocked by IGNITE-21745 : .NET can't read small values with high scale.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)