[ 
https://issues.apache.org/jira/browse/IGNITE-6896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16249762#comment-16249762
 ] 

Alexey Popov commented on IGNITE-6896:
--------------------------------------

Sample exception:

System.TypeInitializationException : The type initializer for 'Casters`1' threw 
an exception.
  ----> System.InvalidOperationException : No coercion operator is defined 
between types 'System.Single[,]' and 'System.Single[]'.
   at Apache.Ignite.Core.Impl.Common.TypeCaster`1.Cast[TFrom](TFrom obj) in 
C:\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Common\TypeCaster.cs:line
 45
   at 
Apache.Ignite.Core.Impl.Binary.BinarySystemWriteHandler`1.Write[T](BinaryWriter 
writer, T obj) in 
C:\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Binary\BinarySystemHandlers.cs:line
 716
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj) in 
C:\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Binary\BinaryWriter.cs:line
 1168
   at Apache.Ignite.Core.Impl.Binary.Marshaller.Marshal[T](T val, IBinaryStream 
stream) in 
C:\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Binary\Marshaller.cs:line
 159
   at Apache.Ignite.Core.Impl.Binary.Marshaller.Marshal[T](T val) in 
C:\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Binary\Marshaller.cs:line
 144
   at Apache.Ignite.Core.Tests.TestUtils.SerializeDeserialize[T](T obj) in 
C:\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core.Tests\TestUtils.cs:line
 384
   at 
Apache.Ignite.Core.Tests.Binary.Serializable.GenericCollectionsTest.TestXX() in 
C:\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core.Tests\Binary\Serializable\GenericCollectionsTest.cs:line
 98
--InvalidOperationException
   at 
System.Linq.Expressions.Expression.GetUserDefinedCoercionOrThrow(ExpressionType 
coercionType, Expression expression, Type convertToType)
   at Apache.Ignite.Core.Impl.Common.TypeCaster`1.Casters`1.Compile() in 
C:\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Common\TypeCaster.cs:line
 85
   at Apache.Ignite.Core.Impl.Common.TypeCaster`1.Casters`1..cctor() in 
C:\incubator-ignite\modules\platforms\dotnet\Apache.Ignite.Core\Impl\Common\TypeCaster.cs:line
 69


> .NET: support Multidimensional Arrays in binary serializer
> ----------------------------------------------------------
>
>                 Key: IGNITE-6896
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6896
>             Project: Ignite
>          Issue Type: Improvement
>      Security Level: Public(Viewable by anyone) 
>          Components: platforms
>    Affects Versions: 2.3
>            Reporter: Alexey Popov
>
> It is found that legacy 2D, 3D, etc. are not working in BinarySerializer.
> Sample reproducer:
> {code:java}
>         [Test]
>         public void TestXX()
>         {
>             var array2D = new float[32, 32];
>             var res = TestUtils.SerializeDeserialize(array2D);
>             Assert.AreEqual(array2D, res);
>         }
> {code}
> BTW, please note that 2D array in Java (a[2][2]) is just a jugged array:
> obj = {byte[2][]@1928}
>  0 = {byte[2]@1974}
>  1 = {byte[2]@1975}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to