vgi-python 0.49.0__py3-none-any.whl → 0.49.1__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.
@@ -909,6 +909,7 @@ class SplitPartitionedFunction(TableFunctionGenerator[SplitPartitionArgs, PartSp
909
909
  @classmethod
910
910
  def on_plan(cls, params: BindParams[SplitPartitionArgs], request: Any) -> PlanResponse:
911
911
  """One split per country, carrying its exact protocol-3.1 key."""
912
+
912
913
  def key_value(country: str) -> pa.RecordBatch | None:
913
914
  if params.args.key_mode == "missing":
914
915
  return None
vgi/argument_spec.py CHANGED
@@ -85,7 +85,8 @@ VGI_DOC_KEY = b"vgi_doc"
85
85
  # vgi_choices — JSON array (the closed set of allowed values)
86
86
  # vgi_range — interval notation built from ge/le/gt/lt (e.g. "[0, 100]",
87
87
  # "(0, +inf)", "[1, 10)"); a discovery surface, not the raw bounds
88
- # vgi_pattern — raw regex the value must match (open set)
88
+ # vgi_pattern — raw regex the value must match (open set); evaluated as an
89
+ # unanchored search (JSON Schema `pattern`), anchor with ^ / $
89
90
  # Kept byte-for-byte in sync with the C++ reader in the vgi extension
90
91
  # (src/vgi_function_arguments_function.cpp / src/include/vgi_protocol_constants.hpp).
91
92
  VGI_DEFAULT_KEY = b"vgi_default"
@@ -144,8 +145,9 @@ class ArgumentSpec:
144
145
  range_notation: Optional interval-notation string built from the arg's
145
146
  numeric bounds (``vgi_range``, e.g. ``"[0, 100]"``); None when
146
147
  unbounded.
147
- pattern: Optional regex the value must match (``vgi_pattern``); None
148
- when there is no pattern constraint.
148
+ pattern: Optional regex the value must match (``vgi_pattern``),
149
+ evaluated as an unanchored search; None when there is no pattern
150
+ constraint.
149
151
 
150
152
  Note:
151
153
  For named arguments, the Python attribute name (``name``) and the SQL
vgi/arguments.py CHANGED
@@ -954,7 +954,9 @@ class Arg[ArgT]:
954
954
  gt: Value must be > this (for numeric types).
955
955
  lt: Value must be < this (for numeric types).
956
956
  choices: Value must be one of these options.
957
- pattern: Value must match this regex pattern (for strings).
957
+ pattern: Regex the value must contain (for strings). Unanchored search
958
+ (JSON Schema ``pattern`` semantics): ``'https?://'`` matches
959
+ anywhere in the value; use ``^`` and ``$`` to anchor.
958
960
 
959
961
  Note:
960
962
  For named arguments (string position), the Python attribute name should
@@ -1038,7 +1040,9 @@ class Arg[ArgT]:
1038
1040
  gt: Minimum value (exclusive). Value must be > this.
1039
1041
  lt: Maximum value (exclusive). Value must be < this.
1040
1042
  choices: Allowed values. Value must be one of these.
1041
- pattern: Regex pattern for string validation.
1043
+ pattern: Regex for string validation. Evaluated as an unanchored
1044
+ search (``re.search``, JSON Schema ``pattern`` semantics); use
1045
+ ``^`` and ``$`` to anchor the whole value.
1042
1046
  varargs: If True, collect all remaining positional arguments from this
1043
1047
  position onwards. Returns tuple[ArgT, ...]. Requires at least 1 value.
1044
1048
  Must be positional (not named).
@@ -1350,7 +1354,7 @@ class Arg[ArgT]:
1350
1354
  valid_range=valid_range,
1351
1355
  default=self.default,
1352
1356
  )
1353
- if not self._compiled_pattern.match(value):
1357
+ if not self._compiled_pattern.search(value):
1354
1358
  raise ArgumentValidationError(
1355
1359
  f"Argument '{arg_name}' does not match the required pattern.",
1356
1360
  arg_name=self._name,
@@ -1447,7 +1451,7 @@ class Arg[ArgT]:
1447
1451
  doc=self.doc if self.doc else None,
1448
1452
  valid_range=valid_range,
1449
1453
  )
1450
- if not self._compiled_pattern.match(value):
1454
+ if not self._compiled_pattern.search(value):
1451
1455
  raise ArgumentValidationError(
1452
1456
  f"Argument '{arg_name}' element {index} does not match pattern.",
1453
1457
  arg_name=self._name,
@@ -1634,7 +1638,8 @@ class Param:
1634
1638
  le: Value must be <= this (inclusive upper bound). Advisory on `Param`.
1635
1639
  gt: Value must be > this (exclusive lower bound). Advisory on `Param`.
1636
1640
  lt: Value must be < this (exclusive upper bound).
1637
- pattern: Regex the value must match (for string parameters).
1641
+ pattern: Regex the value must match (for string parameters). Unanchored
1642
+ search; use ``^`` and ``$`` to anchor.
1638
1643
 
1639
1644
  Example (ScalarFunction compute() - position inferred):
1640
1645
  class AddColumns(ScalarFunction):
@@ -1698,6 +1703,8 @@ class ConstParam:
1698
1703
  gt: Value must be > this (exclusive lower bound); enforced at bind.
1699
1704
  lt: Value must be < this (exclusive upper bound); enforced at bind.
1700
1705
  pattern: Regex the value must match (string params); enforced at bind.
1706
+ Unanchored search (JSON Schema ``pattern``); use ``^`` and ``$`` to
1707
+ anchor.
1701
1708
 
1702
1709
  """
1703
1710
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vgi-python
3
- Version: 0.49.0
3
+ Version: 0.49.1
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
@@ -3,8 +3,8 @@ vgi/_duckdb.py,sha256=Tu8Yb4vABRv4yOMo7qul8LxG_wH5ZqZuOCSSjyiMgbY,2198
3
3
  vgi/_redact.py,sha256=i3p_9huXsNRVL3a7MsWKlPvX8-YwTQMtF-j5obNEJGA,1470
4
4
  vgi/_storage_profile.py,sha256=VkTsXojuE0tHEzurmteQSAiL1vI3CZSgYkL6D_h8GvE,5061
5
5
  vgi/aggregate_function.py,sha256=NYxudbvQ9ZLkP2w5hRdd4YgsGUZ_0cVfqqXnlmJPfls,27389
6
- vgi/argument_spec.py,sha256=SADH97VlFu3asI8CWZ_I7XTuSxwqFciFgdupdAf-tkY,34231
7
- vgi/arguments.py,sha256=4uhXUEzJkwb1u2pgGzNI3zoJDdcc6uNNMS6YUHLIHeA,76077
6
+ vgi/argument_spec.py,sha256=5VqXDuHFcvOVwf9PQPCH-Xe-ya0TL4ticlVmcNmxCR4,34374
7
+ vgi/arguments.py,sha256=frv3cmUaHFnUfsmhJMLib8ivaVkn9W3M2BQd76hlUSs,76548
8
8
  vgi/attach_capabilities.py,sha256=udeIRYQWdyhdnTgGuBNGoedNRi8_9Yvh5JKZXuCqYAA,4225
9
9
  vgi/attach_header.py,sha256=sxpzCOVa5fl_-kQSCZgeUxS5I9Kuv8VCUjAOF5s1pr0,3782
10
10
  vgi/attach_ticket.py,sha256=7ycf7HGFpZ6SUqCKwpRmhg6m4yk2CDbJzcFRSBMODsk,28243
@@ -127,7 +127,7 @@ vgi/_test_fixtures/table/same_name_cached.py,sha256=JMXSXTcqyO7XwWqIizgddlTvLYuU
127
127
  vgi/_test_fixtures/table/same_name_schemas.py,sha256=yRti9HXO3-Y9ahiLIHoaZ31LvWjtPSbjxmPJyoQ_0mQ,4930
128
128
  vgi/_test_fixtures/table/sequence.py,sha256=0kOckCwRu19RMKgFrUcnnnDR8e0utjX_E2kD3w6NnRU,26352
129
129
  vgi/_test_fixtures/table/settings.py,sha256=C4J5OKY3vgNbB09QAiQlzwhI3Tc5wtewHHLFhO5xvo4,16689
130
- vgi/_test_fixtures/table/splits.py,sha256=08GrBXQu-J-S3BDcNt7J75bHquykXmaTrRO9VR5iXU0,51414
130
+ vgi/_test_fixtures/table/splits.py,sha256=Vc9whd_xJjR3Gi61JDV9dzvC86xvxD9miXwGAkHzTGQ,51415
131
131
  vgi/_test_fixtures/table/transaction_storage.py,sha256=cGSaM25cE6brwbUJ0-mchocX0UfwOb7uscCATKLYeME,6086
132
132
  vgi/_test_fixtures/table/tt_pushdown.py,sha256=jMELJ2HkG5-yIuYqKRYaPSouJxs3N-tiWRPthoPZ9ko,7420
133
133
  vgi/_test_fixtures/table/typed_probe.py,sha256=JjgLeHuhkXAVnCcezgqR7ayXMp3tTTixegftCwjKOSY,5122
@@ -206,8 +206,8 @@ vgi/transactor/_duckdb_compat.py,sha256=sXVZ9JLKAQyGR1BjWczSwdQEavtr-TcZPoVZZnTr
206
206
  vgi/transactor/client.py,sha256=7DTeMksogsw6ANjQjGOPpKYrV76rg4_kGjktMJf54jg,4486
207
207
  vgi/transactor/protocol.py,sha256=koHi8ZH_QvZRBjFI_m_o1SpbcilBv_wAjmaGq0k61BY,5201
208
208
  vgi/transactor/server.py,sha256=fJi72oaS8PiOI3rFW0MdetGBFEzFBkLdlDAMmbB50Uw,32663
209
- vgi_python-0.49.0.dist-info/METADATA,sha256=PxwkTnK120eSbyppa7ziC3rQ8j6I_-W5gle-PwJMiKA,26066
210
- vgi_python-0.49.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
211
- vgi_python-0.49.0.dist-info/entry_points.txt,sha256=3Kz1vgodw3pOL_xjtSyDB55-ZRy-U2X-X_Bdr582x0Q,165
212
- vgi_python-0.49.0.dist-info/licenses/LICENSE,sha256=pbJb4zZasP6n5ifEV81wFu017TarjydaYVmGbHcehtY,6103
213
- vgi_python-0.49.0.dist-info/RECORD,,
209
+ vgi_python-0.49.1.dist-info/METADATA,sha256=NrvfU1Jq1e1Jw_3rpF7eIQ9ZvI_MrwbyBxoeYxlMIJ8,26066
210
+ vgi_python-0.49.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
211
+ vgi_python-0.49.1.dist-info/entry_points.txt,sha256=3Kz1vgodw3pOL_xjtSyDB55-ZRy-U2X-X_Bdr582x0Q,165
212
+ vgi_python-0.49.1.dist-info/licenses/LICENSE,sha256=pbJb4zZasP6n5ifEV81wFu017TarjydaYVmGbHcehtY,6103
213
+ vgi_python-0.49.1.dist-info/RECORD,,