vgi-python 0.31.2__py3-none-any.whl → 0.31.4__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/__init__.py +82 -0
- vgi/_test_fixtures/accumulate/worker.py +1 -1
- vgi/_test_fixtures/attach_options.py +1 -1
- vgi/_test_fixtures/bad_enum.py +2 -2
- vgi/_test_fixtures/catalog.py +80 -77
- vgi/_test_fixtures/companion.py +5 -5
- vgi/_test_fixtures/narrow_bind/worker.py +10 -10
- vgi/_test_fixtures/orchard_catalog.py +2 -2
- vgi/_test_fixtures/projection_repro/worker.py +10 -10
- vgi/_test_fixtures/scalar/__init__.py +2 -0
- vgi/_test_fixtures/scalar/arithmetic.py +28 -0
- vgi/_test_fixtures/scalar/null_handling.py +2 -1
- vgi/_test_fixtures/schema_reconcile/worker.py +18 -18
- vgi/_test_fixtures/simple_writable.py +35 -32
- vgi/_test_fixtures/table/filters.py +33 -11
- vgi/_test_fixtures/table/late_materialization.py +5 -1
- vgi/_test_fixtures/table/same_name_schemas.py +3 -3
- vgi/_test_fixtures/table/splits.py +5 -1
- vgi/_test_fixtures/table/tt_pushdown.py +5 -1
- vgi/_test_fixtures/table_in_out_same_name.py +1 -1
- vgi/_test_fixtures/twin_catalogs.py +1 -1
- vgi/_test_fixtures/versioned.py +1 -1
- vgi/_test_fixtures/versioned_tables.py +15 -15
- vgi/_test_fixtures/worker.py +89 -71
- vgi/_test_fixtures/writable/generic.py +1 -1
- vgi/_test_fixtures/writable/worker.py +91 -85
- vgi/aggregate_function.py +9 -0
- vgi/argument_spec.py +80 -2
- vgi/attach_header.py +1 -1
- vgi/catalog/__init__.py +2 -0
- vgi/catalog/catalog_interface.py +267 -172
- vgi/catalog/descriptors.py +61 -61
- vgi/catalog/duckdb_statistics.py +10 -10
- vgi/client/aggregate.py +27 -27
- vgi/client/catalog_mixin.py +158 -103
- vgi/client/cli.py +8 -7
- vgi/client/cli_schema.py +20 -19
- vgi/client/cli_table.py +56 -55
- vgi/client/cli_utils.py +35 -4
- vgi/client/cli_view.py +21 -20
- vgi/client/client.py +363 -48
- vgi/filter_v2.py +1261 -0
- vgi/filter_v2_builder.py +140 -0
- vgi/http/worker_page.py +16 -10
- vgi/meta_worker.py +12 -11
- vgi/metadata.py +221 -10
- vgi/protocol.py +180 -109
- vgi/protocol_version.txt +1 -1
- vgi/scalar_function.py +10 -0
- vgi/schema_path.py +58 -0
- vgi/serve.py +155 -2
- vgi/split_token.py +1 -1
- vgi/table_filter_pushdown.py +190 -333
- vgi/table_function.py +19 -2
- vgi/table_in_out_function.py +12 -1
- vgi/transactor/protocol.py +14 -8
- vgi/transactor/server.py +41 -17
- vgi/worker.py +404 -162
- {vgi_python-0.31.2.dist-info → vgi_python-0.31.4.dist-info}/METADATA +6 -4
- {vgi_python-0.31.2.dist-info → vgi_python-0.31.4.dist-info}/RECORD +63 -60
- {vgi_python-0.31.2.dist-info → vgi_python-0.31.4.dist-info}/WHEEL +0 -0
- {vgi_python-0.31.2.dist-info → vgi_python-0.31.4.dist-info}/entry_points.txt +0 -0
- {vgi_python-0.31.2.dist-info → vgi_python-0.31.4.dist-info}/licenses/LICENSE +0 -0
vgi/__init__.py
CHANGED
|
@@ -26,6 +26,7 @@ from vgi.argument_spec import (
|
|
|
26
26
|
VGI_VARARGS_TRUE,
|
|
27
27
|
ArgumentSpec,
|
|
28
28
|
argument_specs_to_schema,
|
|
29
|
+
parameter_default_values_from_specs,
|
|
29
30
|
schema_to_argument_specs,
|
|
30
31
|
)
|
|
31
32
|
from vgi.arguments import (
|
|
@@ -42,13 +43,54 @@ from vgi.arguments import (
|
|
|
42
43
|
TaggedUnion,
|
|
43
44
|
)
|
|
44
45
|
from vgi.auth import AuthContext, CallContext
|
|
46
|
+
from vgi.filter_v2 import (
|
|
47
|
+
Arithmetic,
|
|
48
|
+
ArithmeticOperator,
|
|
49
|
+
BooleanExpression,
|
|
50
|
+
Call,
|
|
51
|
+
Cast,
|
|
52
|
+
ColumnRef,
|
|
53
|
+
Comparison,
|
|
54
|
+
ComparisonOperator,
|
|
55
|
+
EvaluationContext,
|
|
56
|
+
ExternalSet,
|
|
57
|
+
FieldRef,
|
|
58
|
+
FilterPredicate,
|
|
59
|
+
FilterState,
|
|
60
|
+
FilterV2Error,
|
|
61
|
+
FunctionIdentity,
|
|
62
|
+
In,
|
|
63
|
+
IsNull,
|
|
64
|
+
Literal,
|
|
65
|
+
LiteralSet,
|
|
66
|
+
Negate,
|
|
67
|
+
Not,
|
|
68
|
+
PredicateMode,
|
|
69
|
+
PredicateSource,
|
|
70
|
+
RuntimeFilter,
|
|
71
|
+
StandardFilterFunction,
|
|
72
|
+
)
|
|
73
|
+
from vgi.filter_v2_builder import (
|
|
74
|
+
FilterPayload,
|
|
75
|
+
artifact_payload,
|
|
76
|
+
build_filter_batch,
|
|
77
|
+
deserialize_filter_batch,
|
|
78
|
+
serialize_filter_batch,
|
|
79
|
+
type_payload,
|
|
80
|
+
value_payload,
|
|
81
|
+
)
|
|
45
82
|
from vgi.metadata import (
|
|
83
|
+
ArgumentMonotonicity,
|
|
46
84
|
CatalogFunctionType,
|
|
85
|
+
EvaluationContextCapability,
|
|
86
|
+
FilterFunctionCapability,
|
|
87
|
+
FilterSemanticProfile,
|
|
47
88
|
FunctionExample,
|
|
48
89
|
FunctionStability,
|
|
49
90
|
OrderPreservation,
|
|
50
91
|
ParameterInfo,
|
|
51
92
|
ResolvedMetadata,
|
|
93
|
+
RuntimeFilterAlgorithmCapability,
|
|
52
94
|
TableInputValidationError,
|
|
53
95
|
functions_to_arrow,
|
|
54
96
|
)
|
|
@@ -65,6 +107,7 @@ from vgi.scalar_function import (
|
|
|
65
107
|
ScalarFunctionGenerator,
|
|
66
108
|
TypeMismatchError,
|
|
67
109
|
)
|
|
110
|
+
from vgi.schema_path import SchemaPath
|
|
68
111
|
from vgi.schema_utils import schema, schema_like
|
|
69
112
|
from vgi.table_filter_pushdown import (
|
|
70
113
|
ColumnBounds,
|
|
@@ -96,10 +139,12 @@ __all__ = [
|
|
|
96
139
|
"ArgumentSpec",
|
|
97
140
|
"ArgumentValidationError",
|
|
98
141
|
"Arguments",
|
|
142
|
+
"ArgumentMonotonicity",
|
|
99
143
|
"Auth",
|
|
100
144
|
"AuthContext",
|
|
101
145
|
"CallContext",
|
|
102
146
|
"argument_specs_to_schema",
|
|
147
|
+
"parameter_default_values_from_specs",
|
|
103
148
|
"BindRequest",
|
|
104
149
|
"ColumnBounds",
|
|
105
150
|
"ColumnRefNode",
|
|
@@ -130,6 +175,42 @@ __all__ = [
|
|
|
130
175
|
"FunctionExample",
|
|
131
176
|
"FunctionStability",
|
|
132
177
|
"CatalogFunctionType",
|
|
178
|
+
"FilterSemanticProfile",
|
|
179
|
+
"FilterFunctionCapability",
|
|
180
|
+
"RuntimeFilterAlgorithmCapability",
|
|
181
|
+
"EvaluationContextCapability",
|
|
182
|
+
"FilterV2Error",
|
|
183
|
+
"FilterState",
|
|
184
|
+
"FilterPredicate",
|
|
185
|
+
"PredicateMode",
|
|
186
|
+
"PredicateSource",
|
|
187
|
+
"EvaluationContext",
|
|
188
|
+
"ColumnRef",
|
|
189
|
+
"FieldRef",
|
|
190
|
+
"Literal",
|
|
191
|
+
"Comparison",
|
|
192
|
+
"ComparisonOperator",
|
|
193
|
+
"BooleanExpression",
|
|
194
|
+
"Not",
|
|
195
|
+
"IsNull",
|
|
196
|
+
"LiteralSet",
|
|
197
|
+
"ExternalSet",
|
|
198
|
+
"In",
|
|
199
|
+
"Cast",
|
|
200
|
+
"Arithmetic",
|
|
201
|
+
"ArithmeticOperator",
|
|
202
|
+
"Negate",
|
|
203
|
+
"Call",
|
|
204
|
+
"FunctionIdentity",
|
|
205
|
+
"StandardFilterFunction",
|
|
206
|
+
"RuntimeFilter",
|
|
207
|
+
"FilterPayload",
|
|
208
|
+
"value_payload",
|
|
209
|
+
"type_payload",
|
|
210
|
+
"artifact_payload",
|
|
211
|
+
"build_filter_batch",
|
|
212
|
+
"serialize_filter_batch",
|
|
213
|
+
"deserialize_filter_batch",
|
|
133
214
|
"InitRequest",
|
|
134
215
|
"Level",
|
|
135
216
|
"VgiOutputCollector",
|
|
@@ -138,6 +219,7 @@ __all__ = [
|
|
|
138
219
|
"ParameterInfo",
|
|
139
220
|
"ResolvedMetadata",
|
|
140
221
|
"RowCountMismatchError",
|
|
222
|
+
"SchemaPath",
|
|
141
223
|
"ScalarFunction",
|
|
142
224
|
"ScalarFunctionGenerator",
|
|
143
225
|
"TableInOutFunction",
|
|
@@ -694,7 +694,7 @@ _ACCUMULATE_CATALOG = Catalog(
|
|
|
694
694
|
default_schema="main",
|
|
695
695
|
schemas=[
|
|
696
696
|
Schema(
|
|
697
|
-
|
|
697
|
+
path=["main"],
|
|
698
698
|
comment="Row accumulation keyed by name, persisted via FunctionStorage and scoped per ATTACH",
|
|
699
699
|
functions=[
|
|
700
700
|
AccumulateFunction,
|
vgi/_test_fixtures/bad_enum.py
CHANGED
|
@@ -49,8 +49,8 @@ class _BogusNullHandling(Enum):
|
|
|
49
49
|
class BadEnumCatalog(ExampleCatalog):
|
|
50
50
|
"""ExampleCatalog that advertises a bogus null_handling for one function."""
|
|
51
51
|
|
|
52
|
-
def _function_to_info(self, func_cls: type,
|
|
53
|
-
info = super()._function_to_info(func_cls,
|
|
52
|
+
def _function_to_info(self, func_cls: type, schema_path: list[str]) -> FunctionInfo:
|
|
53
|
+
info = super()._function_to_info(func_cls, schema_path)
|
|
54
54
|
if info.name == BAD_ENUM_FUNCTION and info.null_handling is not None:
|
|
55
55
|
# FunctionInfo is frozen; replace() returns a corrupted copy.
|
|
56
56
|
return replace(info, null_handling=_BogusNullHandling.WEIRD) # type: ignore[arg-type]
|