.NET: Thin client: Fix OP_BINARY_TYPE_GET schema passing format
authorPavel Tupitsyn <ptupitsyn@apache.org>
Thu, 18 Jan 2018 18:25:05 +0000 (21:25 +0300)
committerPavel Tupitsyn <ptupitsyn@apache.org>
Thu, 18 Jan 2018 18:25:05 +0000 (21:25 +0300)
modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/Metadata/BinaryType.cs

index b65ca04..2954a9e 100644 (file)
@@ -1144,7 +1144,13 @@ public class PlatformUtils {
 
         for (BinarySchema schema : schemas) {
             writer.writeInt(schema.schemaId());
-            writer.writeIntArray(schema.fieldIds());
+
+            int[] ids = schema.fieldIds();
+            writer.writeInt(ids.length);
+
+            for (int id : ids) {
+                writer.writeInt(id);
+            }
         }
     }
 
index 514f2e2..06794b5 100644 (file)
@@ -172,7 +172,15 @@ namespace Apache.Ignite.Core.Impl.Binary.Metadata
 
                 for (var i = 0; i < cnt; i++)
                 {
-                    _schema.Add(reader.ReadInt(), reader.ReadIntArray());
+                    var schemaId = reader.ReadInt();
+                    
+                    var ids = new int[reader.ReadInt()];
+                    for (var j = 0; j < ids.Length; j++)
+                    {
+                        ids[j] = reader.ReadInt();
+                    }
+
+                    _schema.Add(schemaId, ids);
                 }
             }