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

Evgeny Stanilovsky updated IGNITE-23243:
----------------------------------------
    Fix Version/s: 3.2
                       (was: 3.1)

> .NET: LINQ: Value was either too large or too small for a Decimal
> -----------------------------------------------------------------
>
>                 Key: IGNITE-23243
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23243
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.2
>
>
> IGNITE-21743 generates SQL with *DECIMAL(60, 30)* casts, but the resulting 
> values might exceed maximum decimal precision in .NET (28-29 digits).
> After IGNITE-23192 fix, *TestCastToDecimalPrecision* fails:
> {code}
> System.OverflowException : Value was either too large or too small for a 
> Decimal.
> 10:07:15            at System.Numerics.BigInteger.op_Explicit(BigInteger 
> value)
>            at 
> Apache.Ignite.Internal.Proto.BinaryTuple.BinaryTupleReader.ReadDecimalUnscaled(ReadOnlySpan`1
>  span, Int32 scale) in 
> /opt/buildagent/work/b8d4df1365f1f1e5/modules/platforms/dotnet/Apache.Ignite/Internal/Proto/BinaryTuple/BinaryTupleReader.cs:line
>  569
>            at 
> Apache.Ignite.Internal.Proto.BinaryTuple.BinaryTupleReader.ReadDecimal(ReadOnlySpan`1
>  span, Int32 scale) in 
> /opt/buildagent/work/b8d4df1365f1f1e5/modules/platforms/dotnet/Apache.Ignite/Internal/Proto/BinaryTuple/BinaryTupleReader.cs:line
>  563
>            at 
> Apache.Ignite.Internal.Proto.BinaryTuple.BinaryTupleReader.GetDecimalNullable(Int32
>  index, Int32 scale) in 
> /opt/buildagent/work/b8d4df1365f1f1e5/modules/platforms/dotnet/Apache.Ignite/Internal/Proto/BinaryTuple/BinaryTupleReader.cs:line
>  264
>            at 
> SingleColumnFromBinaryTupleReader_System.Nullable`1[[System.Decimal, 
> System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, 
> PublicKeyToken=7cec85d7bea7798e]]_57(IReadOnlyList`1 , BinaryTupleReader& )
>            at Apache.Ignite.Internal.Sql.ResultSet`1.ReadRow(IReadOnlyList`1 
> cols, MsgPackReader& reader)
>            at 
> Apache.Ignite.Internal.Sql.ResultSet`1.<>c__DisplayClass37_0.<<EnumerateRows>g__EnumeratePage|0>d.MoveNext()
>            at 
> Apache.Ignite.Internal.Sql.ResultSet`1.EnumerateRows()+MoveNext()
>            at 
> Apache.Ignite.Internal.Sql.ResultSet`1.EnumerateRows()+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
>            at 
> Apache.Ignite.Internal.Linq.IgniteQueryExecutor.ExecuteCollection[T](QueryModel
>  queryModel)+MoveNext()
>            at System.Collections.Generic.List`1..ctor(IEnumerable`1 
> collection)
>            at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
>            at Apache.Ignite.Tests.Linq.LinqTests.TestCastToDecimalPrecision()
> {code}



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

Reply via email to