git » hoplite.git » commit dcec772

small fixes

author Alan Dipert
2021-06-15 15:03:59 UTC
committer Alan Dipert
2021-06-15 15:03:59 UTC
parent b97f00cc3681a9e61fbde4bb70009728359f1bfe

small fixes

datalog.mjs +2 -1

diff --git a/datalog.mjs b/datalog.mjs
index 4779b5e..42859ec 100644
--- a/datalog.mjs
+++ b/datalog.mjs
@@ -88,6 +88,7 @@ class StupidTupleSet {
   }
   equals(other) {
     if (!(other instanceof StupidTupleSet)) return false;
+    if (other.size() !== this.size()) return false;
     if (this.complement(other).size()) return false;
     if (other.complement(this).size()) return false;
     return true;
@@ -197,7 +198,7 @@ function select(rel, find, by) {
           [...rel].map(rx => rx[sym.description]).sort((a, b) => a - b)[0]
         ];
       } else {
-        throw new Error(`Unsupported op: ${op}`);
+        throw new Error(`Unsupported aggregation operator: ${op}`);
       }
     }));
   } else {