inputlayer-client-dev 0.1.0.dev919__py3-none-any.whl → 0.1.0.dev921__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
inputlayer/compiler.py CHANGED
@@ -666,6 +666,17 @@ def compile_rule(
666
666
  else:
667
667
  head_parts.append(column_to_variable(col))
668
668
 
669
+ # Compile filter conditions BEFORE building body atoms, so every column
670
+ # the condition references is registered in the env and gets bound to a
671
+ # variable in its atom. Compiling them after produced atoms with `_` for
672
+ # condition-only columns while the condition referenced an unbound
673
+ # variable - which the engine accepts and silently satisfies, deriving
674
+ # wrong results (e.g. a tier == "gold" filter matching every row).
675
+ cond_parts: list[str] = []
676
+ if condition:
677
+ cond_parts = compile_bool_expr(condition, env)
678
+ cond_parts = [p for p in cond_parts if p]
679
+
669
680
  # Build body atoms
670
681
  body_atoms: list[str] = []
671
682
  for rn, cls, alias in body_relations:
@@ -680,12 +691,6 @@ def compile_rule(
680
691
  atom_parts.append("_")
681
692
  body_atoms.append(f"{rn}({', '.join(atom_parts)})")
682
693
 
683
- # Compile filter conditions
684
- cond_parts: list[str] = []
685
- if condition:
686
- cond_parts = compile_bool_expr(condition, env)
687
- cond_parts = [p for p in cond_parts if p]
688
-
689
694
  all_body = body_atoms + cond_parts
690
695
  prefix = "+" if persistent else ""
691
696
  head_str = f"{prefix}{head_name}({', '.join(head_parts)})"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: inputlayer-client-dev
3
- Version: 0.1.0.dev919
3
+ Version: 0.1.0.dev921
4
4
  Summary: Python Object-Logic Mapper for InputLayer knowledge graph engine
5
5
  License-Expression: Apache-2.0
6
6
  License-File: LICENSE
@@ -8,7 +8,7 @@ inputlayer/aggregations.py,sha256=qQm9PUxTZGCIfCThexrD3wa71327pshI9wJCLkFJI74,29
8
8
  inputlayer/auth.py,sha256=Vp3Jkx9cQUTjPX31cpMIIkPDoBWmjalg1kcyxeYl8pA,3249
9
9
  inputlayer/client.py,sha256=U8zBp0srmTFmzFY626IbrXtlaXbxlWj5Cj_R1vtD17I,7584
10
10
  inputlayer/client_sync.py,sha256=Dz38mRQT3Mc7wwmOYgVQP9dBCVgMFIESATmy7fBYAjc,8346
11
- inputlayer/compiler.py,sha256=3ELVDd0dRNCSLjvQcUQ7paFdqFra5sznWGrrTfvhCwg,24378
11
+ inputlayer/compiler.py,sha256=5YMFZO6sl6lZ63fUH2bCb-PEl1QK_sbB1ntdHRjmi-k,24792
12
12
  inputlayer/connection.py,sha256=tYbRH5Q1OzR1KfguSEhfZ1LXTeX708OIdp-yatbMeoA,13772
13
13
  inputlayer/derived.py,sha256=ngjuYmKY88ZSnmb4RiTB2bDEr9buzoM15J6NdKqhSNo,4793
14
14
  inputlayer/exceptions.py,sha256=6b2WEkpfLnf02MLyXzXA8ohUqIwXFdo4RDWw46FINH8,2712
@@ -48,8 +48,8 @@ inputlayer/migrations/operations.py,sha256=_qiguq0GFcXVZgIJa4vHu7eeKSa5BUh2maDce
48
48
  inputlayer/migrations/recorder.py,sha256=qARvQKL_s84vWTEEuHFAmVPvAZiTYCW4X-HtLIdpnbA,3282
49
49
  inputlayer/migrations/state.py,sha256=BH5_ly9I9bVPn1lvhqS_UWS7NvYg2iCLJrbG50-mwlQ,3695
50
50
  inputlayer/migrations/writer.py,sha256=4EZjKTu10pry-3vVchg36I9aNHs-zavLzJeDbZd2rko,1497
51
- inputlayer_client_dev-0.1.0.dev919.dist-info/METADATA,sha256=Phc3S1tyjDGytvgk6NofH6D6zjZU5CYrDMGdaBkKPXI,19942
52
- inputlayer_client_dev-0.1.0.dev919.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
53
- inputlayer_client_dev-0.1.0.dev919.dist-info/entry_points.txt,sha256=xEo6y283VSdmZ4G_KSh1-Cpl3ZPmgM6x9OLT8VJcrqs,70
54
- inputlayer_client_dev-0.1.0.dev919.dist-info/licenses/LICENSE,sha256=zed5l9sdToIBMxqe_4I7nX1NTIlqxzT_PBO3rj7-ax4,11281
55
- inputlayer_client_dev-0.1.0.dev919.dist-info/RECORD,,
51
+ inputlayer_client_dev-0.1.0.dev921.dist-info/METADATA,sha256=j6xsBI7GizHy4JBZes1QFLTzWnwz6VYlAcuuR_mhfDc,19942
52
+ inputlayer_client_dev-0.1.0.dev921.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
53
+ inputlayer_client_dev-0.1.0.dev921.dist-info/entry_points.txt,sha256=xEo6y283VSdmZ4G_KSh1-Cpl3ZPmgM6x9OLT8VJcrqs,70
54
+ inputlayer_client_dev-0.1.0.dev921.dist-info/licenses/LICENSE,sha256=zed5l9sdToIBMxqe_4I7nX1NTIlqxzT_PBO3rj7-ax4,11281
55
+ inputlayer_client_dev-0.1.0.dev921.dist-info/RECORD,,