diff --git a/pymbolic/mapper/persistent_hash.py b/pymbolic/mapper/persistent_hash.py index ad2deae..5f10d90 100644 --- a/pymbolic/mapper/persistent_hash.py +++ b/pymbolic/mapper/persistent_hash.py @@ -49,3 +49,9 @@ def map_constant(self, expr): expr = expr.item() self.key_hash.update(repr(expr).encode("utf8")) + + def map_comparison(self, expr): + if self.visit(expr): + self.rec(expr.left) + self.key_hash.update(repr(expr.operator).encode("utf8")) + self.rec(expr.right)