vgi-python 0.36.0__py3-none-any.whl → 0.36.2__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.
- vgi/_test_fixtures/table/__init__.py +2 -0
- vgi/_test_fixtures/table/filters.py +123 -0
- vgi/_test_fixtures/table/splits.py +5 -3
- vgi/_test_fixtures/worker.py +2 -0
- vgi/aggregate_function.py +8 -1
- vgi/client/aggregate.py +4 -1
- vgi/filter_v2.py +18 -5
- vgi/protocol.py +4 -1
- vgi/table_filter_pushdown.py +79 -1
- {vgi_python-0.36.0.dist-info → vgi_python-0.36.2.dist-info}/METADATA +1 -1
- {vgi_python-0.36.0.dist-info → vgi_python-0.36.2.dist-info}/RECORD +14 -14
- {vgi_python-0.36.0.dist-info → vgi_python-0.36.2.dist-info}/WHEEL +0 -0
- {vgi_python-0.36.0.dist-info → vgi_python-0.36.2.dist-info}/entry_points.txt +0 -0
- {vgi_python-0.36.0.dist-info → vgi_python-0.36.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -65,6 +65,7 @@ from vgi._test_fixtures.table.catalog_scans import (
|
|
|
65
65
|
ProjectsScanFunction,
|
|
66
66
|
)
|
|
67
67
|
from vgi._test_fixtures.table.filters import (
|
|
68
|
+
BoolFilterEchoFunction,
|
|
68
69
|
DictFilterEchoFunction,
|
|
69
70
|
DynamicFilterEchoFunction,
|
|
70
71
|
ExpressionFilterTestFunction,
|
|
@@ -216,6 +217,7 @@ __all__ = [
|
|
|
216
217
|
"ConstantColumnsFunction",
|
|
217
218
|
"CountryPartitionedSalesFunction",
|
|
218
219
|
"DepartmentsScanFunction",
|
|
220
|
+
"BoolFilterEchoFunction",
|
|
219
221
|
"DictFilterEchoFunction",
|
|
220
222
|
"DisjointRangePartitionedFunction",
|
|
221
223
|
"DoubleSequenceFunction",
|
|
@@ -191,6 +191,129 @@ class FilterEchoFunction(TableFunctionGenerator[FilterEchoFunctionArgs, FilterEc
|
|
|
191
191
|
state.remaining -= size
|
|
192
192
|
|
|
193
193
|
|
|
194
|
+
# ============================================================================
|
|
195
|
+
# BoolFilterEchoFunction — a table function with a BOOLEAN column, so the
|
|
196
|
+
# bare-column predicate shapes (`WHERE flag`, `WHERE NOT flag`) can be driven
|
|
197
|
+
# end to end.
|
|
198
|
+
#
|
|
199
|
+
# filter_echo cannot cover these: its schema has no boolean column, so the
|
|
200
|
+
# predicate cannot even be written. The table-in-out `echo` path cannot either
|
|
201
|
+
# — DuckDB does not hand it a bare boolean column as a pushed predicate, so a
|
|
202
|
+
# test written there passes whether or not the worker can decode one. It takes
|
|
203
|
+
# a TABLE FUNCTION with a boolean column to see the shape at all, which is why
|
|
204
|
+
# a decoder that refused every one of them ("predicate root must resolve to
|
|
205
|
+
# BOOLEAN", vgi-python < 0.36.2) went unnoticed by a filter-pushdown suite of
|
|
206
|
+
# 348 files including one dedicated to booleans.
|
|
207
|
+
#
|
|
208
|
+
# `pushed_filters` echoes the SQL rendering, so this covers both halves: the
|
|
209
|
+
# decode (the rows are auto-applied and must be right) and `to_sql()` (a shape
|
|
210
|
+
# that parses but renders nothing would show up here as "(none)").
|
|
211
|
+
# ============================================================================
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
@dataclass(slots=True, frozen=True)
|
|
215
|
+
class _BoolFilterEchoArgs:
|
|
216
|
+
"""Arguments for BoolFilterEchoFunction."""
|
|
217
|
+
|
|
218
|
+
count: Annotated[int, Arg(0, doc="Number of rows to generate", ge=0)]
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
@dataclass(kw_only=True)
|
|
222
|
+
class _BoolFilterEchoState(ArrowSerializableDataclass):
|
|
223
|
+
"""Remaining rows plus the echoed SQL rendering of the pushed filters."""
|
|
224
|
+
|
|
225
|
+
remaining: int
|
|
226
|
+
current_index: int = 0
|
|
227
|
+
filter_str: str = "(none)"
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
@init_single_worker
|
|
231
|
+
@bind_fixed_schema
|
|
232
|
+
@_cardinality_from_count
|
|
233
|
+
class BoolFilterEchoFunction(TableFunctionGenerator[_BoolFilterEchoArgs, _BoolFilterEchoState]):
|
|
234
|
+
"""Rows with a nullable BOOLEAN column, echoing the pushed-down filters.
|
|
235
|
+
|
|
236
|
+
SCHEMA
|
|
237
|
+
------
|
|
238
|
+
Output: {"n": int64, "flag": bool, "pushed_filters": string}
|
|
239
|
+
|
|
240
|
+
``flag`` cycles TRUE, FALSE, NULL so every predicate is exercised against
|
|
241
|
+
all three truth values -- the NULL row is what distinguishes ``WHERE flag``
|
|
242
|
+
from ``WHERE flag IS NOT FALSE``, and ``WHERE NOT flag`` from
|
|
243
|
+
``WHERE flag IS NOT TRUE``.
|
|
244
|
+
|
|
245
|
+
Attributes:
|
|
246
|
+
FIXED_SCHEMA: The fixed Arrow output schema this function always produces.
|
|
247
|
+
|
|
248
|
+
"""
|
|
249
|
+
|
|
250
|
+
class Meta:
|
|
251
|
+
"""Metadata for BoolFilterEchoFunction."""
|
|
252
|
+
|
|
253
|
+
name = "bool_filter_echo"
|
|
254
|
+
description = "Rows with a nullable BOOLEAN column, echoing pushed-down filters"
|
|
255
|
+
categories = ["generator", "diagnostic"]
|
|
256
|
+
filter_pushdown = True
|
|
257
|
+
auto_apply_filters = True
|
|
258
|
+
projection_pushdown = True
|
|
259
|
+
examples = [
|
|
260
|
+
FunctionExample(
|
|
261
|
+
sql="SELECT * FROM bool_filter_echo(6) WHERE flag",
|
|
262
|
+
description="A boolean column is a predicate on its own",
|
|
263
|
+
),
|
|
264
|
+
]
|
|
265
|
+
|
|
266
|
+
FIXED_SCHEMA: ClassVar[pa.Schema] = schema({"n": pa.int64(), "flag": pa.bool_(), "pushed_filters": pa.utf8()})
|
|
267
|
+
|
|
268
|
+
@classmethod
|
|
269
|
+
def initial_state(cls, params: ProcessParams[_BoolFilterEchoArgs]) -> _BoolFilterEchoState:
|
|
270
|
+
"""Create initial state, caching the SQL rendering of the pushed filters."""
|
|
271
|
+
assert params.init_call is not None
|
|
272
|
+
pf = params.init_call.pushdown_filters
|
|
273
|
+
filters = (
|
|
274
|
+
cls.pushdown_filters(
|
|
275
|
+
pf,
|
|
276
|
+
join_keys=params.init_call.join_keys,
|
|
277
|
+
output_schema=params.init_call.output_schema,
|
|
278
|
+
)
|
|
279
|
+
if pf is not None
|
|
280
|
+
else None
|
|
281
|
+
)
|
|
282
|
+
return _BoolFilterEchoState(
|
|
283
|
+
remaining=params.args.count,
|
|
284
|
+
filter_str=_format_pushed_filters(filters),
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
@classmethod
|
|
288
|
+
def process(
|
|
289
|
+
cls,
|
|
290
|
+
params: ProcessParams[_BoolFilterEchoArgs],
|
|
291
|
+
state: _BoolFilterEchoState,
|
|
292
|
+
out: OutputCollector,
|
|
293
|
+
) -> None:
|
|
294
|
+
"""Emit rows whose ``flag`` cycles TRUE, FALSE, NULL."""
|
|
295
|
+
if state.remaining <= 0:
|
|
296
|
+
out.finish()
|
|
297
|
+
return
|
|
298
|
+
|
|
299
|
+
n_values = list(range(state.current_index, state.current_index + state.remaining))
|
|
300
|
+
flags: list[bool | None] = [(True, False, None)[i % 3] for i in n_values]
|
|
301
|
+
|
|
302
|
+
out.emit(
|
|
303
|
+
pa.RecordBatch.from_pydict(
|
|
304
|
+
{
|
|
305
|
+
"n": n_values,
|
|
306
|
+
"flag": flags,
|
|
307
|
+
"pushed_filters": [state.filter_str] * len(n_values),
|
|
308
|
+
},
|
|
309
|
+
schema=params.output_schema,
|
|
310
|
+
)
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
state.current_index += state.remaining
|
|
314
|
+
state.remaining = 0
|
|
315
|
+
|
|
316
|
+
|
|
194
317
|
# ============================================================================
|
|
195
318
|
# ValuePruneFunction — exercises PushdownFilters.get_column_values('n'), the
|
|
196
319
|
# partition-pruning idiom (resolve the discrete value set up front, fetch only
|
|
@@ -18,8 +18,8 @@ ways it goes right:
|
|
|
18
18
|
shape that silently truncates a scan if a reader treats an empty split as EOS.
|
|
19
19
|
* ``split_skewed(n)`` — one split ~100x the others, so greedy claiming can be
|
|
20
20
|
told apart from static assignment.
|
|
21
|
-
* ``split_many(n, splits
|
|
22
|
-
forces sequential re-init on a reused connection.
|
|
21
|
+
* ``split_many(n, splits)`` — far more splits than reader threads (pass them), which
|
|
22
|
+
forces sequential re-init on a reused connection. ``splits <= 0`` means 1000.
|
|
23
23
|
* ``split_echo_filters(n)`` — reports the pushdown it saw *per split*, so a
|
|
24
24
|
pushdown regression is visible without inferring it from row counts.
|
|
25
25
|
"""
|
|
@@ -322,7 +322,9 @@ class SplitManyFunction(_SplitBase):
|
|
|
322
322
|
|
|
323
323
|
@classmethod
|
|
324
324
|
def _split_count(cls, params: BindParams[SplitSequenceArgs]) -> int:
|
|
325
|
-
|
|
325
|
+
# Honour the caller's count, as every other SDK's twin does; a floor here
|
|
326
|
+
# made a test that asks for 64 splits pay for 1000 HTTP round trips.
|
|
327
|
+
return params.args.splits if params.args.splits > 0 else 1000
|
|
326
328
|
|
|
327
329
|
|
|
328
330
|
@dataclass(frozen=True)
|
vgi/_test_fixtures/worker.py
CHANGED
|
@@ -140,6 +140,7 @@ from vgi._test_fixtures.table import (
|
|
|
140
140
|
RFF_SIMPLE_COLUMNS,
|
|
141
141
|
RFF_STRUCT_COLUMNS,
|
|
142
142
|
BatchIndexOverflowFunction,
|
|
143
|
+
BoolFilterEchoFunction,
|
|
143
144
|
BrokenMissingPartitionValuesFunction,
|
|
144
145
|
BrokenPartitionColumnAbsentFromBatchFunction,
|
|
145
146
|
BrokenPartitionMinNeqMaxFunction,
|
|
@@ -486,6 +487,7 @@ _EXAMPLE_CATALOG = Catalog(
|
|
|
486
487
|
# TableFunctionGenerator - generate output without input
|
|
487
488
|
ConstantColumnsFunction,
|
|
488
489
|
SlowCancellableFunction,
|
|
490
|
+
BoolFilterEchoFunction,
|
|
489
491
|
FilterEchoFunction,
|
|
490
492
|
FilterEchoPartitionedFunction,
|
|
491
493
|
FilterEchoTableScanFunction,
|
vgi/aggregate_function.py
CHANGED
|
@@ -518,7 +518,14 @@ class AggregateFunction[TState: StreamStateCodec](vgi.function.Function):
|
|
|
518
518
|
"""Compute the aggregate value for one output row.
|
|
519
519
|
|
|
520
520
|
Args:
|
|
521
|
-
rid:
|
|
521
|
+
rid: Identifies the output row being filled; do not use it to
|
|
522
|
+
index the partition. Over the per-row ``aggregate_window``
|
|
523
|
+
RPC it is DuckDB's own ``rid``: the row's index within the
|
|
524
|
+
current output chunk (``0 <= rid < 2048``), not its row in
|
|
525
|
+
the partition. When the default :meth:`window_batch` calls
|
|
526
|
+
this, it passes the partition row index instead. Either way
|
|
527
|
+
``subframes`` are partition-relative: use them to find the
|
|
528
|
+
rows to aggregate.
|
|
522
529
|
subframes: Frame ranges ``[(begin, end), ...]`` — 1 for the default
|
|
523
530
|
frame, 3 when ``EXCLUDE`` produces multiple subframes.
|
|
524
531
|
partition: The cached partition data.
|
vgi/client/aggregate.py
CHANGED
|
@@ -371,7 +371,10 @@ class AggregateSession:
|
|
|
371
371
|
|
|
372
372
|
Args:
|
|
373
373
|
partition_id: The partition previously shipped by :meth:`window_init`.
|
|
374
|
-
rid:
|
|
374
|
+
rid: Identifies the output row. The DuckDB extension sends DuckDB's
|
|
375
|
+
own per-row ``rid``, the row's index within the current output
|
|
376
|
+
chunk rather than its row in the partition; ``frames`` carry the
|
|
377
|
+
partition-relative bounds, and a worker must use those.
|
|
375
378
|
frames: The row's subframes as ``(begin, end)`` half-open offsets
|
|
376
379
|
into the partition. One entry normally; two or three for
|
|
377
380
|
``EXCLUDE TIES`` / ``EXCLUDE GROUP``.
|
vgi/filter_v2.py
CHANGED
|
@@ -740,11 +740,24 @@ class _Parser:
|
|
|
740
740
|
|
|
741
741
|
@staticmethod
|
|
742
742
|
def _is_boolean(expression: FilterExpression) -> bool:
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
743
|
+
"""Whether *expression* resolves to BOOLEAN.
|
|
744
|
+
|
|
745
|
+
Ask the type, never the node kind. The two agree for every node whose
|
|
746
|
+
type is structurally fixed -- a comparison is BOOLEAN whatever its
|
|
747
|
+
operands -- and that is exactly why enumerating kinds looked sufficient.
|
|
748
|
+
It is not: ``column_ref``, ``field_ref``, ``cast`` and ``arithmetic``
|
|
749
|
+
are BOOLEAN or not depending on a type resolved from elsewhere (the
|
|
750
|
+
bind output schema, or a parent expression), and the schema admits all
|
|
751
|
+
four as a predicate root -- ``coreExpression`` lists ``columnRef``
|
|
752
|
+
first. Enumerating kinds rejected the lot, so the idiomatic
|
|
753
|
+
``WHERE flag`` / ``WHERE NOT flag`` -- which DuckDB pushes down as a
|
|
754
|
+
bare column reference rather than rewriting to ``flag = true`` -- was
|
|
755
|
+
refused as "predicate root must resolve to BOOLEAN" even though the
|
|
756
|
+
parser had already resolved the column to BOOLEAN and stored it on the
|
|
757
|
+
node.
|
|
758
|
+
"""
|
|
759
|
+
data_type = expression_type(expression)
|
|
760
|
+
return data_type is not None and pa.types.is_boolean(data_type)
|
|
748
761
|
|
|
749
762
|
def _payload(self, prefix: str, ref: object) -> tuple[pa.Field[Any], pa.Scalar[Any]]:
|
|
750
763
|
index = _uint(ref, f"{prefix}_ref")
|
vgi/protocol.py
CHANGED
|
@@ -2887,7 +2887,10 @@ class AggregateWindowRequest(ArrowSerializableDataclass):
|
|
|
2887
2887
|
execution_id: Identifier for one query execution, stable across the
|
|
2888
2888
|
coordinator and any secondary workers; keys worker-owned state.
|
|
2889
2889
|
partition_id: Identifier of the window partition this call addresses.
|
|
2890
|
-
rid:
|
|
2890
|
+
rid: Which output row this call fills, as DuckDB's per-row window callback
|
|
2891
|
+
reports it: the row's index within the current output chunk
|
|
2892
|
+
(``0 <= rid < STANDARD_VECTOR_SIZE``), NOT its row in the partition.
|
|
2893
|
+
The frames below are partition-relative; use them to find the rows.
|
|
2891
2894
|
frame_starts: Subframe start offsets (inclusive) within the partition, one
|
|
2892
2895
|
per subframe.
|
|
2893
2896
|
frame_ends: Subframe end offsets (exclusive) within the partition, parallel
|
vgi/table_filter_pushdown.py
CHANGED
|
@@ -63,6 +63,9 @@ from vgi.filter_v2 import (
|
|
|
63
63
|
from vgi.filter_v2 import (
|
|
64
64
|
Literal as V2Literal,
|
|
65
65
|
)
|
|
66
|
+
from vgi.filter_v2 import (
|
|
67
|
+
Not as V2Not,
|
|
68
|
+
)
|
|
66
69
|
from vgi.filter_v2 import (
|
|
67
70
|
RuntimeFilter as V2RuntimeFilter,
|
|
68
71
|
)
|
|
@@ -72,6 +75,9 @@ from vgi.filter_v2 import (
|
|
|
72
75
|
from vgi.filter_v2 import (
|
|
73
76
|
expression_columns as v2_expression_columns,
|
|
74
77
|
)
|
|
78
|
+
from vgi.filter_v2 import (
|
|
79
|
+
expression_type as v2_expression_type,
|
|
80
|
+
)
|
|
75
81
|
|
|
76
82
|
if TYPE_CHECKING:
|
|
77
83
|
from collections.abc import Callable, Iterator
|
|
@@ -207,6 +213,7 @@ __all__ = [
|
|
|
207
213
|
"OrFilter",
|
|
208
214
|
"StructFilter",
|
|
209
215
|
"ExpressionFilter",
|
|
216
|
+
"FilterSQLUnsupportedError",
|
|
210
217
|
"V2ExpressionFilter",
|
|
211
218
|
# Expression node classes
|
|
212
219
|
"ExpressionNode",
|
|
@@ -1638,6 +1645,22 @@ class PushdownFilters:
|
|
|
1638
1645
|
# =============================================================================
|
|
1639
1646
|
|
|
1640
1647
|
|
|
1648
|
+
class FilterSQLUnsupportedError(ValueError):
|
|
1649
|
+
"""A filter that `to_sql()` cannot render as a SQL fragment.
|
|
1650
|
+
|
|
1651
|
+
Raised rather than skipped, and that is the whole point: DuckDB does **not**
|
|
1652
|
+
re-apply a predicate it pushed into a table function, so a WHERE clause that
|
|
1653
|
+
silently omits one does not return the same rows more slowly -- it returns
|
|
1654
|
+
the wrong rows. Degrading quietly here would turn an unrenderable filter
|
|
1655
|
+
into a wrong answer with no error anywhere.
|
|
1656
|
+
|
|
1657
|
+
A worker that catches this has two honest options: evaluate the filters in
|
|
1658
|
+
memory instead (`PushdownFilters.apply()` / `evaluate()` handle every v2
|
|
1659
|
+
expression), or decline the scan. Subclasses `ValueError` so existing
|
|
1660
|
+
callers that catch the old error keep working.
|
|
1661
|
+
"""
|
|
1662
|
+
|
|
1663
|
+
|
|
1641
1664
|
def _filter_to_sql(
|
|
1642
1665
|
f: Filter,
|
|
1643
1666
|
quote: Callable[[str], str],
|
|
@@ -1713,8 +1736,19 @@ def _filter_to_sql(
|
|
|
1713
1736
|
# Constants are embedded directly in the SQL string.
|
|
1714
1737
|
return expr.to_sql(f.column_name), []
|
|
1715
1738
|
|
|
1739
|
+
case V2ExpressionFilter(expression=expression):
|
|
1740
|
+
# A v2 expression the legacy projection could not reduce to a leaf
|
|
1741
|
+
# shape (arithmetic, casts, extension calls, ...). It evaluates
|
|
1742
|
+
# correctly -- `V2ExpressionFilter.evaluate()` runs the v2 reference
|
|
1743
|
+
# evaluator -- there is simply no SQL rendering for it yet.
|
|
1744
|
+
raise FilterSQLUnsupportedError(
|
|
1745
|
+
f"filter on {f.column_name!r} is a v2 expression with no SQL rendering "
|
|
1746
|
+
f"({type(expression).__name__}); evaluate it with PushdownFilters.apply() "
|
|
1747
|
+
f"instead, or the scan will return rows the predicate excludes"
|
|
1748
|
+
)
|
|
1749
|
+
|
|
1716
1750
|
case _:
|
|
1717
|
-
raise
|
|
1751
|
+
raise FilterSQLUnsupportedError(f"Unknown filter type: {type(f)}")
|
|
1718
1752
|
|
|
1719
1753
|
|
|
1720
1754
|
# =============================================================================
|
|
@@ -1787,6 +1821,48 @@ def _pushdown_from_v2_state(state: V2FilterState) -> PushdownFilters:
|
|
|
1787
1821
|
)
|
|
1788
1822
|
|
|
1789
1823
|
|
|
1824
|
+
def _v2_boolean_column_view(expression: V2FilterExpression) -> Filter | None:
|
|
1825
|
+
"""Project ``WHERE flag`` / ``WHERE NOT flag`` onto the legacy equality leaf.
|
|
1826
|
+
|
|
1827
|
+
DuckDB pushes a predicate that *is* a boolean column down as a bare
|
|
1828
|
+
``column_ref``, not as ``flag = true``. Left as a generic v2 expression it
|
|
1829
|
+
becomes a `V2ExpressionFilter`, which evaluates fine but renders no SQL --
|
|
1830
|
+
so every SQL-backed worker loses pushdown on the most ordinary boolean
|
|
1831
|
+
predicate there is, and on the commonest shape of all, a conjunction with
|
|
1832
|
+
one, it loses pushdown for the whole conjunction.
|
|
1833
|
+
|
|
1834
|
+
The rewrite is exact rather than approximate, including under NULLs:
|
|
1835
|
+
``WHERE flag`` keeps only TRUE (a NULL predicate is not satisfied), and so
|
|
1836
|
+
does ``flag = true``; ``WHERE NOT flag`` keeps only FALSE, and so does
|
|
1837
|
+
``flag = false``. Three-valued logic makes the two pairs agree on every
|
|
1838
|
+
input, which is what lets this be a projection and not a semantic change.
|
|
1839
|
+
|
|
1840
|
+
Args:
|
|
1841
|
+
expression: A v2 expression that may be a bare boolean column or its
|
|
1842
|
+
negation.
|
|
1843
|
+
|
|
1844
|
+
Returns:
|
|
1845
|
+
The equivalent `ConstantFilter`, or None when *expression* is neither.
|
|
1846
|
+
|
|
1847
|
+
"""
|
|
1848
|
+
|
|
1849
|
+
def boolean_column(node: V2FilterExpression) -> V2ColumnRef | None:
|
|
1850
|
+
if not isinstance(node, V2ColumnRef):
|
|
1851
|
+
return None
|
|
1852
|
+
node_type = v2_expression_type(node)
|
|
1853
|
+
# An unresolved column (no bind schema) is not known to be boolean, and
|
|
1854
|
+
# guessing here would rewrite a non-boolean predicate into `= true`.
|
|
1855
|
+
if node_type is None or not pa.types.is_boolean(node_type):
|
|
1856
|
+
return None
|
|
1857
|
+
return node
|
|
1858
|
+
|
|
1859
|
+
if ref := boolean_column(expression):
|
|
1860
|
+
return ConstantFilter(ref.column_name, ref.column_index, ComparisonOp.EQ, pa.scalar(True))
|
|
1861
|
+
if isinstance(expression, V2Not) and (ref := boolean_column(expression.expression)):
|
|
1862
|
+
return ConstantFilter(ref.column_name, ref.column_index, ComparisonOp.EQ, pa.scalar(False))
|
|
1863
|
+
return None
|
|
1864
|
+
|
|
1865
|
+
|
|
1790
1866
|
def _v2_filter_view(expression: V2FilterExpression, context: EvaluationContext) -> Filter | None:
|
|
1791
1867
|
"""Project common v2 shapes into the longstanding convenience classes."""
|
|
1792
1868
|
if isinstance(expression, V2Comparison):
|
|
@@ -1802,6 +1878,8 @@ def _v2_filter_view(expression: V2FilterExpression, context: EvaluationContext)
|
|
|
1802
1878
|
}
|
|
1803
1879
|
if op := mapping.get(expression.op):
|
|
1804
1880
|
return ConstantFilter(operands[0].column_name, operands[0].column_index, op, operands[1].value)
|
|
1881
|
+
if boolean_leaf := _v2_boolean_column_view(expression):
|
|
1882
|
+
return boolean_leaf
|
|
1805
1883
|
if isinstance(expression, V2IsNull) and isinstance(expression.expression, V2ColumnRef):
|
|
1806
1884
|
ref = expression.expression
|
|
1807
1885
|
if expression.negated:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: vgi-python
|
|
3
|
-
Version: 0.36.
|
|
3
|
+
Version: 0.36.2
|
|
4
4
|
Summary: Vector Gateway Interface - Connect DuckDB to external programs via Apache Arrow
|
|
5
5
|
Project-URL: Homepage, https://query.farm
|
|
6
6
|
Project-URL: Repository, https://github.com/Query-farm/vgi-python
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
vgi/__init__.py,sha256=8uLMNQcNzWjp8VzYtj2u98_Wp8WpB8c_dKlMv67TH0g,5384
|
|
2
2
|
vgi/_duckdb.py,sha256=YB5D7N3Bwg_xP6X8a5QlumtlAovSej1A1Go5XlNGVko,2162
|
|
3
3
|
vgi/_storage_profile.py,sha256=VkTsXojuE0tHEzurmteQSAiL1vI3CZSgYkL6D_h8GvE,5061
|
|
4
|
-
vgi/aggregate_function.py,sha256=
|
|
4
|
+
vgi/aggregate_function.py,sha256=NYxudbvQ9ZLkP2w5hRdd4YgsGUZ_0cVfqqXnlmJPfls,27389
|
|
5
5
|
vgi/argument_spec.py,sha256=SADH97VlFu3asI8CWZ_I7XTuSxwqFciFgdupdAf-tkY,34231
|
|
6
6
|
vgi/arguments.py,sha256=ncnC1CS7KN-2rDjSw9vdf1uHqV5ozebet_eZtcq_ujw,72300
|
|
7
7
|
vgi/attach_header.py,sha256=sxpzCOVa5fl_-kQSCZgeUxS5I9Kuv8VCUjAOF5s1pr0,3782
|
|
@@ -10,7 +10,7 @@ vgi/cache_control.py,sha256=IyBp9gZTCc4Y-4V7Rs05_o5lSEjbR2jt6cddXPU0dKw,7812
|
|
|
10
10
|
vgi/copy_from_function.py,sha256=oroQe5qYzZTJ-ppzQTQ-OruEF1ZlwTBNLBoXYfN-P2o,7133
|
|
11
11
|
vgi/copy_to_function.py,sha256=8l0v_DyEF1EnFwinStrZDQ-yNFfGJsv3Mr5o2jG30f0,9279
|
|
12
12
|
vgi/exceptions.py,sha256=oX_sZc9xGWi7Xf8cJQf89fX19i3ocDEj_V_76GINgBQ,7294
|
|
13
|
-
vgi/filter_v2.py,sha256=
|
|
13
|
+
vgi/filter_v2.py,sha256=FXuYOrm7uA-c0hYBXd5ScCRfjJmR5I9KfTT78e3o0vM,57089
|
|
14
14
|
vgi/filter_v2_builder.py,sha256=8OmyzDI6GDdH4pYm2sJFMidzKusi0I8IGNipolPpjX0,5535
|
|
15
15
|
vgi/function.py,sha256=KIfvKk1nzBvRDPXViHNX89tv6gvIMiDj4e8fl6ANqQg,11626
|
|
16
16
|
vgi/function_storage.py,sha256=FjVwxc1BIjWo-82j8YE5qcU8w66sGjwyGsTmCUhn-Kw,67576
|
|
@@ -22,7 +22,7 @@ vgi/meta_worker.py,sha256=WggIKvDAlahSrBPaVM7ZqVWk3Xc3JNE70EgeoXdy-3w,31725
|
|
|
22
22
|
vgi/metadata.py,sha256=M8KZObX1wwCr2lPjgDL0-79gPbeM_NSOIqYCIAAck5M,74719
|
|
23
23
|
vgi/otel.py,sha256=JlUDnk2c0UXSo_j1PJdS67Y--t55sXPg054ADuvHANc,15452
|
|
24
24
|
vgi/profiling.py,sha256=rK7vij3oHhXC3JHI2BsMySsXh7_hrXi0aXpCW8iFSIc,3671
|
|
25
|
-
vgi/protocol.py,sha256=
|
|
25
|
+
vgi/protocol.py,sha256=8exFFAV4Zo1ltEPVtoWhJdlOG3TcdqxkmtwOv1mRLNs,170570
|
|
26
26
|
vgi/protocol_version.txt,sha256=wo_MpTY3vIjhJK8XJd8Ty5jGne3v1i-zzb4c22t2BiQ,6
|
|
27
27
|
vgi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
28
|
vgi/scalar_function.py,sha256=YBy5s4eEBYTMjACGPE-8-82BObyJoM9qt9cnm24b_RQ,53485
|
|
@@ -33,7 +33,7 @@ vgi/secret_service.py,sha256=r7qCzfnOMirf9wSCUe-mgFe3z6v9_cDRzixuSAZG_bs,8973
|
|
|
33
33
|
vgi/serve.py,sha256=5UmvRAGcHj5RKCOUQMXG9RFVYAbLZsHwwk1qVI9fipY,63844
|
|
34
34
|
vgi/split_token.py,sha256=tutcksj-hgWrLY7UW3sSqkyoaD-cMqNTOeff40MGl_g,10850
|
|
35
35
|
vgi/table_buffering_function.py,sha256=O5TcIdqk8-YViCQCkb8bOevO-zhe3IoyzLgwXDO3Cjc,19531
|
|
36
|
-
vgi/table_filter_pushdown.py,sha256=
|
|
36
|
+
vgi/table_filter_pushdown.py,sha256=4Qo4OAOLjTYQ5pinNTOjLCDnb96OHqpcxJlbSJo3cJU,67144
|
|
37
37
|
vgi/table_function.py,sha256=8Pti3uFnsRaPCVG-CGYl9r3GHJF146Fp_62oXXwHKKw,73502
|
|
38
38
|
vgi/table_in_out_function.py,sha256=F2QEtsbGEYHDVyQ4Cf9OCW7HlWXeqekAyx607foB-bs,19393
|
|
39
39
|
vgi/worker.py,sha256=MGMQmy6PPKCqo5q_9fBS3z3zf4y6-UKdJAJiHGfnk50,249553
|
|
@@ -57,7 +57,7 @@ vgi/_test_fixtures/table_in_out_same_name.py,sha256=jdsQNdKn64T54W_TcLB-rhydI69Y
|
|
|
57
57
|
vgi/_test_fixtures/twin_catalogs.py,sha256=UFsFuZ_nFpe62HatGnOMru36vk35Xt3Ta1Hkr1aWN9w,4450
|
|
58
58
|
vgi/_test_fixtures/versioned.py,sha256=gnxNejc4cNGPKl_DxJk1SU8Ielj-rwmQYGkiShXzxK4,5786
|
|
59
59
|
vgi/_test_fixtures/versioned_tables.py,sha256=_JHPe6LaiO0x2We28Ion8hh6pSATmHZYvAczB4uwBsA,22272
|
|
60
|
-
vgi/_test_fixtures/worker.py,sha256=
|
|
60
|
+
vgi/_test_fixtures/worker.py,sha256=ybrkhnYchWhbdMbUYKHHsnB6W0K5y9-QplyJSx2Bs7Y,96508
|
|
61
61
|
vgi/_test_fixtures/accumulate/__init__.py,sha256=4hYT8jqRoVHSjV9TB7v0Z1CMJtdLuPaDWSz4J2fvMDs,868
|
|
62
62
|
vgi/_test_fixtures/accumulate/worker.py,sha256=4a2VaCoOIXPEoJpkNume7FoBlQzs9kRl8b-_ZJMHvnQ,30165
|
|
63
63
|
vgi/_test_fixtures/aggregate/__init__.py,sha256=2GCp80FNrsWFOA2SV3lCffzLjoN5AKwrf57t2YRg8O0,2393
|
|
@@ -90,13 +90,13 @@ vgi/_test_fixtures/scalar/settings_secrets.py,sha256=ZOGkGY0CoD3ous_ij0--ss5byB4
|
|
|
90
90
|
vgi/_test_fixtures/scalar/type_info.py,sha256=2WeTxakT-_tcWybPfkCrAHVAMOadFN3tb8E3_EmqIyw,6304
|
|
91
91
|
vgi/_test_fixtures/schema_reconcile/__init__.py,sha256=rCCtM5bd67-PTPeIYg9SCJaKUSglA6YeXsedQBEUlmA,1324
|
|
92
92
|
vgi/_test_fixtures/schema_reconcile/worker.py,sha256=_r-cCQC3r48F0yTEdZC5zQYN_vuCx1HIkoP8_idBJHk,23680
|
|
93
|
-
vgi/_test_fixtures/table/__init__.py,sha256=
|
|
93
|
+
vgi/_test_fixtures/table/__init__.py,sha256=qwTsNJLlsWgD4wEJav8e6pU1MQl8jV8Gvw6wR0v9crM,9945
|
|
94
94
|
vgi/_test_fixtures/table/_common.py,sha256=m_99LRrDlULKGg8W8gJQQ29-_RxFINFlCMi3JtM0Y08,7753
|
|
95
95
|
vgi/_test_fixtures/table/batch_index.py,sha256=P5ds0xgikuEQanSEWVWKMLbdvIzUeJraI-GuSoPdb6U,11641
|
|
96
96
|
vgi/_test_fixtures/table/batch_index_broken.py,sha256=kZOGrLL7ZW1rmwPmNEYRmiF_vqIfHsfXioq5vKPWHk0,7314
|
|
97
97
|
vgi/_test_fixtures/table/cache.py,sha256=7oohKpFJ_si7LoKE7QINkz5oIyj1sx8Kiobpwo4Sn7w,72322
|
|
98
98
|
vgi/_test_fixtures/table/catalog_scans.py,sha256=5j1Sx02-HWK7bFurDu4e9HiS3Q9BmBukA3sAErH4GHE,5080
|
|
99
|
-
vgi/_test_fixtures/table/filters.py,sha256=
|
|
99
|
+
vgi/_test_fixtures/table/filters.py,sha256=1FCD_rTs8ssen7QZ_J3p0izKO09jzWEJ3j5L37sqkc4,46725
|
|
100
100
|
vgi/_test_fixtures/table/late_materialization.py,sha256=BT1FOpQNeP4IXBS3hUvAmO-5jscl5iiQ11fvxUfN6DM,10355
|
|
101
101
|
vgi/_test_fixtures/table/make_series.py,sha256=K-G_YNq25Kb7I5bp6XK4rCZzwMYNTxgKH3M_O-AQAlA,8812
|
|
102
102
|
vgi/_test_fixtures/table/misc.py,sha256=71WOIFqk5ntnEIqsG-57rZ9DY7ShQqMKHi7yluNAlM4,16250
|
|
@@ -110,7 +110,7 @@ vgi/_test_fixtures/table/same_name_cached.py,sha256=JMXSXTcqyO7XwWqIizgddlTvLYuU
|
|
|
110
110
|
vgi/_test_fixtures/table/same_name_schemas.py,sha256=yRti9HXO3-Y9ahiLIHoaZ31LvWjtPSbjxmPJyoQ_0mQ,4930
|
|
111
111
|
vgi/_test_fixtures/table/sequence.py,sha256=0kOckCwRu19RMKgFrUcnnnDR8e0utjX_E2kD3w6NnRU,26352
|
|
112
112
|
vgi/_test_fixtures/table/settings.py,sha256=C4J5OKY3vgNbB09QAiQlzwhI3Tc5wtewHHLFhO5xvo4,16689
|
|
113
|
-
vgi/_test_fixtures/table/splits.py,sha256=
|
|
113
|
+
vgi/_test_fixtures/table/splits.py,sha256=CNPj98k1G-gqh-orppzHkUSUh2x058HgZAIjCyRoxjM,48549
|
|
114
114
|
vgi/_test_fixtures/table/transaction_storage.py,sha256=cGSaM25cE6brwbUJ0-mchocX0UfwOb7uscCATKLYeME,6086
|
|
115
115
|
vgi/_test_fixtures/table/tt_pushdown.py,sha256=jMELJ2HkG5-yIuYqKRYaPSouJxs3N-tiWRPthoPZ9ko,7420
|
|
116
116
|
vgi/_test_fixtures/table/typed_probe.py,sha256=JjgLeHuhkXAVnCcezgqR7ayXMp3tTTixegftCwjKOSY,5122
|
|
@@ -130,7 +130,7 @@ vgi/catalog/secret_type.py,sha256=1DoEMyQun9K5z53817rUuhG1YpHSEAsazEmubkRLVL0,37
|
|
|
130
130
|
vgi/catalog/setting.py,sha256=06QfgaAR-0BKflIJ0du6PGqA5BPMdrkwr6u7f4nddII,1846
|
|
131
131
|
vgi/catalog/storage.py,sha256=DhngzywbhQUfLF7NjFyiPp4Sw2ovOhcUXAuW3rkBQD8,11935
|
|
132
132
|
vgi/client/__init__.py,sha256=mFLHTWI4DjWz_Yp0dE9k5U_PtrRGTe2Az0GJELMwwMc,2467
|
|
133
|
-
vgi/client/aggregate.py,sha256=
|
|
133
|
+
vgi/client/aggregate.py,sha256=EAaI-4d1mnNjGORZvLf3wfVuu8RXBTFGVbMek0DeGDg,38482
|
|
134
134
|
vgi/client/catalog_mixin.py,sha256=uh-UCdrROyyc3JiwzHI1q3fSHWmiECsCuLzM7VzOCfc,58652
|
|
135
135
|
vgi/client/cli.py,sha256=nahuRCjday0z74Gk9zxOxIOJX9n6fHrP7-CGwJoyTzU,22754
|
|
136
136
|
vgi/client/cli_catalog.py,sha256=twjlhHGl7n2mNN4jc7DnDRQr-Zj9KLAF2eATIQnITHQ,5577
|
|
@@ -152,8 +152,8 @@ vgi/transactor/_duckdb_compat.py,sha256=sXVZ9JLKAQyGR1BjWczSwdQEavtr-TcZPoVZZnTr
|
|
|
152
152
|
vgi/transactor/client.py,sha256=7DTeMksogsw6ANjQjGOPpKYrV76rg4_kGjktMJf54jg,4486
|
|
153
153
|
vgi/transactor/protocol.py,sha256=v59IvrKnuvwOXvn_HEcBAbCzDVcx0akgKN0R1mChXg0,5034
|
|
154
154
|
vgi/transactor/server.py,sha256=nzsZQxJZdgappdYX8okrFIrjFtUbdM_Hhskl1fZ2nDY,32553
|
|
155
|
-
vgi_python-0.36.
|
|
156
|
-
vgi_python-0.36.
|
|
157
|
-
vgi_python-0.36.
|
|
158
|
-
vgi_python-0.36.
|
|
159
|
-
vgi_python-0.36.
|
|
155
|
+
vgi_python-0.36.2.dist-info/METADATA,sha256=kwE2GNB9zbRBOopkbMvkpJoV6dW7sbz8p6f5CGUtU-s,25617
|
|
156
|
+
vgi_python-0.36.2.dist-info/WHEEL,sha256=THafob7ofN-NsuMN7Mg4qZyHaQI7KkD-QlcQatYhXPo,87
|
|
157
|
+
vgi_python-0.36.2.dist-info/entry_points.txt,sha256=3Kz1vgodw3pOL_xjtSyDB55-ZRy-U2X-X_Bdr582x0Q,165
|
|
158
|
+
vgi_python-0.36.2.dist-info/licenses/LICENSE,sha256=pbJb4zZasP6n5ifEV81wFu017TarjydaYVmGbHcehtY,6103
|
|
159
|
+
vgi_python-0.36.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|