You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4ac7b9d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/catalog-interface.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,6 +127,7 @@ Information about a function in a schema:
127
127
|`function_type`|`FunctionType`|`SCALAR` or `TABLE`|
128
128
|`arguments`|`SerializedSchema`| Argument schema as Arrow bytes |
129
129
|`output_schema`|`SerializedSchema`| Output schema as Arrow bytes |
130
+
|`parameter_default_values`|`pa.RecordBatch \| None`| One-row typed defaults batch containing only defaulted parameters in signature order; a present null is an explicit `NULL` default |
**Function-signature decision:** 2026-09-10 — named fixed parameters,
11
+
authoritative typed defaults, and bind-time resolved names are part of VGI 2.0;
12
+
there is no protocol overload identifier.
13
+
10
14
## Executive answer
11
15
12
16
Nested schemas are **not** the only possible VGI protocol change.
@@ -26,6 +30,43 @@ My confidence is **high that the audit has found the DuckDB 2.0 changes that alt
26
30
27
31
VGI protocol 2.0 will not carry a v1 compatibility path. A 1.x peer is rejected during protocol negotiation. The DuckDB 1.5 extension can still implement the v2 wire format; its engine adapter simply produces the subset of the v2 AST that DuckDB 1.5 can offer.
28
32
33
+
## Accepted function-signature contract
34
+
35
+
DuckDB 2.0 can bind named arguments and defaults for scalar, aggregate, and
36
+
window functions. VGI models the portable semantics rather than exposing a
37
+
DuckDB overload handle:
38
+
39
+
1. For scalar and aggregate functions, fields in `FunctionInfo.arguments` are
40
+
ordered fixed signature slots and each field name is the SQL/VGI parameter
41
+
name. `vgi_arg=named` remains reserved for table-function-style named-only
42
+
options. `vgi_const` is orthogonal to naming.
43
+
2.`FunctionInfo.parameter_default_values` is a nullable IPC-serialized
44
+
`RecordBatch`. When present it has exactly one row and contains only
45
+
defaulted parameters, in signature order. Column absence means required/no
46
+
default; a present null scalar means an explicit `NULL` default. Each column
47
+
type exactly matches its argument field. Scalar and aggregate defaults form
48
+
a trailing sequence of fixed parameters, and varargs cannot have defaults.
49
+
3.`BindRequest.argument_names` and `AggregateBindRequest.argument_names` are
50
+
nullable `list<utf8>` values aligned with the complete logical argument
51
+
order before constant arguments are separated for execution. Fixed slots
52
+
carry their declared names, unnamed varargs carry null elements, and named
53
+
varargs retain caller-provided names. A null list means the engine cannot
54
+
provide resolved names.
55
+
56
+
The legacy `vgi_default` field metadata is discovery-only and may be removed in
57
+
a later protocol. It is never authoritative when the typed batch is present.
58
+
Implementations select behavior by inspecting the bound arguments, types, and
59
+
resolved names; VGI does not add `overload_id`.
60
+
61
+
The DuckDB 1.5 adapter implements this VGI 2.0 wire shape now. It advertises and
62
+
validates typed defaults and synthesizes fixed names plus null unnamed-vararg
63
+
entries. Because DuckDB 1.5 cannot register scalar/aggregate named calls or
64
+
engine-applied defaults, SQL callers must still provide those values
65
+
positionally. A DuckDB 2.0 adapter can map the same metadata to
66
+
`FunctionSignature` without changing the worker protocol. DataFusion, Spark,
67
+
and SQLite adapters should normalize their native call forms to the same bind
68
+
representation.
69
+
29
70
## 1. Protocol version and rollout
30
71
31
72
At the start of the audit, the application protocol declared `1.5.0`. It now declares `2.0.0` in the canonical `vgi-python/vgi/protocol_version.txt`. The documented version rules treat a parameter or return-type change as a major change, the framework enforces an exact major/minor match, and the C++ consumer rejects response column-count drift.
0 commit comments