ravel-net / pyotr

Apache License 2.0
0 stars 0 forks source link

Equality operator issue for inet_faure datatype #24

Closed lanfangping closed 1 year ago

lanfangping commented 1 year ago

When I run unit_test_IP(), the inet_faure datatype reports the following issue:

Traceback (most recent call last):
  File "/home/fangping/Projects/pyotr/experiments/BDD_annalyze/loggingTest.py", line 94, in <module>
    unit_test_IP()
  File "/home/fangping/Projects/pyotr/experiments/BDD_annalyze/loggingTest.py", line 87, in unit_test_IP
    print(program1.contains(program2))
  File "/home/fangping/Projects/pyotr/Core/Homomorphism/Datalog/program.py", line 81, in contains
    if not self.contains_rule(rule):
  File "/home/fangping/Projects/pyotr/Core/Homomorphism/Datalog/program.py", line 137, in contains_rule
    changed = self.execute(conn)
  File "/home/fangping/Projects/pyotr/Core/Homomorphism/Datalog/program.py", line 96, in execute
    DB_changes = rule.execute(conn)
  File "/home/fangping/Projects/pyotr/utils/logging.py", line 12, in timeit_wrapper
    result = func(*args, **kwargs)
  File "/home/fangping/Projects/pyotr/Core/Homomorphism/Datalog/rule.py", line 355, in execute
    return self.run_with_faure(conn, self.sql)
  File "/home/fangping/Projects/pyotr/utils/logging.py", line 12, in timeit_wrapper
    result = func(*args, **kwargs)
  File "/home/fangping/Projects/pyotr/Core/Homomorphism/Datalog/rule.py", line 611, in run_with_faure
    changed = self.insertTuplesToHead(conn)
  File "/home/fangping/Projects/pyotr/utils/logging.py", line 12, in timeit_wrapper
    result = func(*args, **kwargs)
  File "/home/fangping/Projects/pyotr/Core/Homomorphism/Datalog/rule.py", line 574, in insertTuplesToHead
    cursor.execute(select_gen_sql)
psycopg2.errors.UndefinedFunction: could not identify an equality operator for type inet_faure
LINE 1: select distinct CAST(c0 as inet_faure), CAST(c1 as inet_faur...
mudbri commented 1 year ago

@lanfangping this should be fixed in commit: 9a26da1780dea754b49b528a3bfa4fe6f8f9fa75 Please let me know (and reopen this or another issue) if you encounter any new bugs