Explorar o código

HUE-3827 [libsentry] Workaround Hive for THRIFT-3388 hash doesn't work on set/list

Romain Rigaux %!s(int64=9) %!d(string=hai) anos
pai
achega
c068d18

+ 1 - 1
desktop/libs/libsentry/gen-py/sentry_policy_service/ttypes.py

@@ -1615,7 +1615,7 @@ class TSentryRole(object):
   def __hash__(self):
     value = 17
     value = (value * 31) ^ hash(self.roleName)
-    value = (value * 31) ^ hash(self.groups)
+    value = (value * 31) ^ hash(frozenset(self.groups))
     value = (value * 31) ^ hash(self.grantorPrincipal)
     return value