diff --git a/.gitignore b/.gitignore index e3c95b9..30ee945 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,6 @@ env /*.egg-info/ /.idea /build -/daffodil/*.c \ No newline at end of file +/daffodil/*.c +*~ +*.so \ No newline at end of file diff --git a/daffodil/hstore_predicate.pyx b/daffodil/hstore_predicate.pyx index ca9a8bb..aa6661f 100644 --- a/daffodil/hstore_predicate.pyx +++ b/daffodil/hstore_predicate.pyx @@ -22,7 +22,7 @@ def forces_optimizer(children): return False return all( - isinstance(expr, ExpressionStr) and expr.daff_test == "?=" + isinstance(expr, ExpressionStr) and expr.daff_test == "?=" and expr.daff_val == True for expr in children ) diff --git a/test/tests.py b/test/tests.py index 0e82a84..c0ae589 100644 --- a/test/tests.py +++ b/test/tests.py @@ -567,6 +567,15 @@ def test_timestamp_notin(self): ) """) + def test_or_nonexistence(self): + self.assert_filter_has_n_results(4, """ + num_of_sat_test_takers = 50 + [ + non_existing ?= false + non_existing_too ?= false + ] + """) + #def test_comparing_a_string_containing_int(self): # self.assert_filter_has_n_results(417, """