@@ -51,6 +51,7 @@ class TestBoolColumnBool8Literal:
5151 """
5252
5353 def test_eq_true (self ) -> None :
54+ """EQ against a bool8 literal matches the plain-bool column."""
5455 batch = _batch_with_bool ("flag" , [True , False , None , True ])
5556 f = ConstantFilter (
5657 column_name = "flag" ,
@@ -62,6 +63,7 @@ def test_eq_true(self) -> None:
6263 assert result .to_pylist () == [True , False , None , True ]
6364
6465 def test_eq_false (self ) -> None :
66+ """EQ against a false bool8 literal."""
6567 batch = _batch_with_bool ("flag" , [True , False , None , True ])
6668 f = ConstantFilter (
6769 column_name = "flag" ,
@@ -72,6 +74,7 @@ def test_eq_false(self) -> None:
7274 assert f .evaluate (batch ).to_pylist () == [False , True , None , False ]
7375
7476 def test_ne_true (self ) -> None :
77+ """NE against a bool8 literal."""
7578 batch = _batch_with_bool ("flag" , [True , False , None , True ])
7679 f = ConstantFilter (
7780 column_name = "flag" ,
@@ -95,6 +98,7 @@ class TestBool8ColumnBool8Literal:
9598 """
9699
97100 def test_eq_true (self ) -> None :
101+ """EQ with bool8 on both sides of the kernel."""
98102 batch = _batch_with_bool8 ("flag" , [True , False , None , True ])
99103 f = ConstantFilter (
100104 column_name = "flag" ,
@@ -105,6 +109,7 @@ def test_eq_true(self) -> None:
105109 assert f .evaluate (batch ).to_pylist () == [True , False , None , True ]
106110
107111 def test_eq_false (self ) -> None :
112+ """EQ against a false literal with bool8 on both sides."""
108113 batch = _batch_with_bool8 ("flag" , [True , False , None , True ])
109114 f = ConstantFilter (
110115 column_name = "flag" ,
@@ -128,11 +133,13 @@ class TestPlainTypesUnchanged:
128133 """
129134
130135 def test_int32_eq (self ) -> None :
136+ """Plain int32 EQ flows through normalisation unchanged."""
131137 batch = pa .RecordBatch .from_pydict ({"n" : pa .array ([1 , 2 , 3 , 4 ], type = pa .int32 ())})
132138 f = ConstantFilter (column_name = "n" , column_index = 0 , op = ComparisonOp .EQ , value = pa .scalar (2 , type = pa .int32 ()))
133139 assert f .evaluate (batch ).to_pylist () == [False , True , False , False ]
134140
135141 def test_string_eq (self ) -> None :
142+ """Plain string EQ flows through normalisation unchanged."""
136143 batch = pa .RecordBatch .from_pydict ({"s" : ["a" , "b" , "c" ]})
137144 f = ConstantFilter (column_name = "s" , column_index = 0 , op = ComparisonOp .EQ , value = pa .scalar ("b" ))
138145 assert f .evaluate (batch ).to_pylist () == [False , True , False ]
@@ -158,6 +165,7 @@ class TestInFilterExtension:
158165 """
159166
160167 def test_in_bool_with_bool8_values (self ) -> None :
168+ """IN with bool8 values against a plain-bool column."""
161169 batch = _batch_with_bool ("flag" , [True , False , None , True ])
162170 # Build the values array as a bool8 extension array
163171 storage = pa .array ([1 ], type = pa .int8 ())
@@ -173,11 +181,14 @@ def test_in_bool_with_bool8_values(self) -> None:
173181
174182
175183class TestPlainLiteralBool8Column :
176- """Defensive: if some future code path emits a plain bool literal but
177- the column happens to be bool8, normalisation should still align them.
184+ """Defensive symmetry check: plain bool literal against a bool8 column.
185+
186+ If some future code path emits a plain bool literal but the column
187+ happens to be bool8, normalisation should still align them.
178188 """
179189
180190 def test_plain_bool_literal_bool8_column (self ) -> None :
191+ """Plain bool literal against a bool8 column."""
181192 batch = _batch_with_bool8 ("flag" , [True , False , None , True ])
182193 f = ConstantFilter (
183194 column_name = "flag" ,
@@ -197,8 +208,10 @@ def test_plain_bool_literal_bool8_column(self) -> None:
197208
198209
199210def test_pyarrow_kernel_gap_still_present () -> None :
200- """Documents the underlying PyArrow gap. If this passes in a future
201- PyArrow release the normalisation helper is over-defensive but harmless.
211+ """Document the underlying PyArrow gap.
212+
213+ If this passes in a future PyArrow release the normalisation helper
214+ is over-defensive but harmless.
202215 """
203216 import pyarrow .compute as pc
204217
@@ -245,6 +258,7 @@ class TestUuidExtension:
245258 ]
246259
247260 def test_eq (self ) -> None :
261+ """EQ with arrow.uuid on both sides."""
248262 batch = pa .RecordBatch .from_arrays ([_uuid_array (self .UUIDS )], names = ["id" ])
249263 f = ConstantFilter (
250264 column_name = "id" ,
@@ -255,6 +269,7 @@ def test_eq(self) -> None:
255269 assert f .evaluate (batch ).to_pylist () == [False , True , None , False ]
256270
257271 def test_ne (self ) -> None :
272+ """NE with arrow.uuid on both sides."""
258273 batch = pa .RecordBatch .from_arrays ([_uuid_array (self .UUIDS )], names = ["id" ])
259274 f = ConstantFilter (
260275 column_name = "id" ,
@@ -265,6 +280,7 @@ def test_ne(self) -> None:
265280 assert f .evaluate (batch ).to_pylist () == [True , False , None , True ]
266281
267282 def test_in (self ) -> None :
283+ """IN with an arrow.uuid values array."""
268284 batch = pa .RecordBatch .from_arrays ([_uuid_array (self .UUIDS )], names = ["id" ])
269285 values = _uuid_array (
270286 [
@@ -282,8 +298,10 @@ def test_in(self) -> None:
282298
283299
284300def test_pyarrow_interval_kernel_gap () -> None :
285- """PyArrow has no ``equal`` kernel for any of the interval types
286- (``month_day_nano_interval``, ``day_time_interval``, ``month_interval``).
301+ """PyArrow has no ``equal`` kernel for any interval type.
302+
303+ The affected types are ``month_day_nano_interval``,
304+ ``day_time_interval``, and ``month_interval``.
287305
288306 This means a filter pushdown like ``WHERE col = INTERVAL '1 day'``
289307 cannot be evaluated on the worker side regardless of whether we strip
0 commit comments