You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/06/07 09:22:20 UTC

[GitHub] [ignite] isapego commented on a change in pull request #9154: IGNITE-14826 .NET: Support string and array keys in thin client with partition awareness

isapego commented on a change in pull request #9154:
URL: https://github.com/apache/ignite/pull/9154#discussion_r646409652



##########
File path: modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryHashCodeUtils.cs
##########
@@ -45,11 +45,33 @@ public static unsafe int GetHashCode<T>(T val, Marshaller marsh, IDictionary<int
             if (type == typeof(long))
                 return GetLongHashCode(TypeCaster<long>.Cast(val));
 
+            if (type == typeof(string))
+                return BinaryUtils.GetStringHashCode((string) (object) val);
+
+            if (type == typeof(Guid))
+                return GetGuidHashCode(TypeCaster<Guid>.Cast(val));
+
+            if (type == typeof(uint))
+            {
+                var val0 = TypeCaster<uint>.Cast(val);
+                return *(int*) &val0;
+            }
+
+            if (type == typeof(ulong))
+            {
+                var val0 = TypeCaster<ulong>.Cast(val);
+                return GetLongHashCode(*(long*) &val0);
+            }
+

Review comment:
       What about all these types? They was not supported also?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org