From 861367f7d5f4837db1140458b06d67182c9e61d8 Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Thu, 19 Sep 2024 17:25:15 -0500 Subject: [PATCH] PersistentHashWalkMapper: do not ignore comparison operator --- pymbolic/mapper/persistent_hash.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pymbolic/mapper/persistent_hash.py b/pymbolic/mapper/persistent_hash.py index ad2deae1..5f10d903 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)