vgi-python 0.31.3__py3-none-any.whl → 0.32.0__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 +87 -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 +19 -21
- vgi/_test_fixtures/simple_writable.py +107 -64
- 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 +15 -11
- vgi/_test_fixtures/writable/table.py +10 -10
- vgi/_test_fixtures/writable/worker.py +92 -89
- vgi/aggregate_function.py +9 -0
- vgi/argument_spec.py +80 -2
- vgi/attach_header.py +1 -1
- vgi/catalog/__init__.py +7 -0
- vgi/catalog/catalog_interface.py +274 -183
- vgi/catalog/descriptors.py +88 -64
- vgi/catalog/duckdb_statistics.py +10 -10
- vgi/client/aggregate.py +27 -27
- vgi/client/catalog_mixin.py +96 -96
- 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 +31 -31
- vgi/filter_v2.py +1261 -0
- vgi/filter_v2_builder.py +140 -0
- vgi/http/vgi-client.js +17 -18
- 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/split_token.py +1 -1
- vgi/table_filter_pushdown.py +170 -331
- vgi/table_function.py +19 -2
- vgi/transactor/protocol.py +18 -11
- vgi/transactor/server.py +94 -37
- vgi/worker.py +212 -152
- vgi/write_results.py +73 -0
- {vgi_python-0.31.3.dist-info → vgi_python-0.32.0.dist-info}/METADATA +3 -3
- {vgi_python-0.31.3.dist-info → vgi_python-0.32.0.dist-info}/RECORD +64 -60
- {vgi_python-0.31.3.dist-info → vgi_python-0.32.0.dist-info}/WHEEL +0 -0
- {vgi_python-0.31.3.dist-info → vgi_python-0.32.0.dist-info}/entry_points.txt +0 -0
- {vgi_python-0.31.3.dist-info → vgi_python-0.32.0.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,
|
|
@@ -86,20 +129,27 @@ from vgi.table_in_out_function import (
|
|
|
86
129
|
TableInOutGenerator,
|
|
87
130
|
)
|
|
88
131
|
from vgi.worker import Worker
|
|
132
|
+
from vgi.write_results import WriteOperation, WriteResultMode, write_changes_batch, write_result_schema
|
|
89
133
|
|
|
90
134
|
__all__ = [
|
|
91
135
|
"AggregateBindParams",
|
|
92
136
|
"AggregateFunction",
|
|
137
|
+
"WriteOperation",
|
|
138
|
+
"WriteResultMode",
|
|
139
|
+
"write_result_schema",
|
|
140
|
+
"write_changes_batch",
|
|
93
141
|
"AnyArrow",
|
|
94
142
|
"AnyArrowValue",
|
|
95
143
|
"Arg",
|
|
96
144
|
"ArgumentSpec",
|
|
97
145
|
"ArgumentValidationError",
|
|
98
146
|
"Arguments",
|
|
147
|
+
"ArgumentMonotonicity",
|
|
99
148
|
"Auth",
|
|
100
149
|
"AuthContext",
|
|
101
150
|
"CallContext",
|
|
102
151
|
"argument_specs_to_schema",
|
|
152
|
+
"parameter_default_values_from_specs",
|
|
103
153
|
"BindRequest",
|
|
104
154
|
"ColumnBounds",
|
|
105
155
|
"ColumnRefNode",
|
|
@@ -130,6 +180,42 @@ __all__ = [
|
|
|
130
180
|
"FunctionExample",
|
|
131
181
|
"FunctionStability",
|
|
132
182
|
"CatalogFunctionType",
|
|
183
|
+
"FilterSemanticProfile",
|
|
184
|
+
"FilterFunctionCapability",
|
|
185
|
+
"RuntimeFilterAlgorithmCapability",
|
|
186
|
+
"EvaluationContextCapability",
|
|
187
|
+
"FilterV2Error",
|
|
188
|
+
"FilterState",
|
|
189
|
+
"FilterPredicate",
|
|
190
|
+
"PredicateMode",
|
|
191
|
+
"PredicateSource",
|
|
192
|
+
"EvaluationContext",
|
|
193
|
+
"ColumnRef",
|
|
194
|
+
"FieldRef",
|
|
195
|
+
"Literal",
|
|
196
|
+
"Comparison",
|
|
197
|
+
"ComparisonOperator",
|
|
198
|
+
"BooleanExpression",
|
|
199
|
+
"Not",
|
|
200
|
+
"IsNull",
|
|
201
|
+
"LiteralSet",
|
|
202
|
+
"ExternalSet",
|
|
203
|
+
"In",
|
|
204
|
+
"Cast",
|
|
205
|
+
"Arithmetic",
|
|
206
|
+
"ArithmeticOperator",
|
|
207
|
+
"Negate",
|
|
208
|
+
"Call",
|
|
209
|
+
"FunctionIdentity",
|
|
210
|
+
"StandardFilterFunction",
|
|
211
|
+
"RuntimeFilter",
|
|
212
|
+
"FilterPayload",
|
|
213
|
+
"value_payload",
|
|
214
|
+
"type_payload",
|
|
215
|
+
"artifact_payload",
|
|
216
|
+
"build_filter_batch",
|
|
217
|
+
"serialize_filter_batch",
|
|
218
|
+
"deserialize_filter_batch",
|
|
133
219
|
"InitRequest",
|
|
134
220
|
"Level",
|
|
135
221
|
"VgiOutputCollector",
|
|
@@ -138,6 +224,7 @@ __all__ = [
|
|
|
138
224
|
"ParameterInfo",
|
|
139
225
|
"ResolvedMetadata",
|
|
140
226
|
"RowCountMismatchError",
|
|
227
|
+
"SchemaPath",
|
|
141
228
|
"ScalarFunction",
|
|
142
229
|
"ScalarFunctionGenerator",
|
|
143
230
|
"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]
|