Explorar el Código

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

Romain Rigaux hace 9 años
padre
commit
c068d18e2d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      desktop/libs/libsentry/gen-py/sentry_policy_service/ttypes.py

+ 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