@query-farm/vgi 0.27.0 → 0.29.0

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.
Files changed (83) hide show
  1. package/README.md +26 -7
  2. package/dist/arguments/argument-spec.d.ts +53 -0
  3. package/dist/arrow/impl-arrowjs/index.d.ts +1 -1
  4. package/dist/arrow/impl-arrowjs/iterate.d.ts +10 -1
  5. package/dist/arrow/impl-arrowjs/schema.d.ts +2 -0
  6. package/dist/arrow/impl-flechette/index.d.ts +1 -1
  7. package/dist/arrow/impl-flechette/iterate.d.ts +10 -1
  8. package/dist/arrow/impl-flechette/schema.d.ts +2 -0
  9. package/dist/arrow/index.d.ts +1 -1
  10. package/dist/arrow/schema-types.d.ts +3 -1
  11. package/dist/arrow/types.d.ts +39 -3
  12. package/dist/catalog/interface.d.ts +43 -0
  13. package/dist/client/client.d.ts +1 -1
  14. package/dist/client-entry.js +360 -178
  15. package/dist/client-entry.js.map +14 -14
  16. package/dist/functions/table.d.ts +63 -0
  17. package/dist/functions/types.d.ts +38 -0
  18. package/dist/generated/vgi-client.d.ts +59 -0
  19. package/dist/generated/vgi-protocol-schemas.d.ts +19 -0
  20. package/dist/http/fetch.d.ts +10 -0
  21. package/dist/index.core.d.ts +2 -2
  22. package/dist/index.js +1203 -834
  23. package/dist/index.js.map +40 -37
  24. package/dist/protocol/handlers/catalog/shared.d.ts +0 -8
  25. package/dist/protocol/handlers/function.d.ts +11 -0
  26. package/dist/protocol/serializers/bind.d.ts +1 -2
  27. package/dist/protocol/serializers/cardinality.d.ts +1 -2
  28. package/dist/protocol/serializers/splits.d.ts +126 -0
  29. package/dist/protocol/types.d.ts +27 -0
  30. package/dist/request-auth.d.ts +28 -0
  31. package/dist/serve-entry.d.ts +4 -0
  32. package/dist/serve-entry.js +745 -359
  33. package/dist/serve-entry.js.map +32 -29
  34. package/dist/split-token.d.ts +88 -0
  35. package/dist/worker-cf-entry.js +1029 -619
  36. package/dist/worker-cf-entry.js.map +37 -34
  37. package/package.json +3 -3
  38. package/src/arguments/argument-spec.ts +81 -0
  39. package/src/arguments/arguments.ts +0 -1
  40. package/src/arrow/impl-arrowjs/index.ts +1 -1
  41. package/src/arrow/impl-arrowjs/iterate.ts +21 -0
  42. package/src/arrow/impl-arrowjs/schema.ts +4 -0
  43. package/src/arrow/impl-flechette/index.ts +1 -1
  44. package/src/arrow/impl-flechette/iterate.ts +24 -1
  45. package/src/arrow/impl-flechette/schema.ts +4 -0
  46. package/src/arrow/index.ts +1 -1
  47. package/src/arrow/schema-types.ts +4 -0
  48. package/src/arrow/types.ts +39 -3
  49. package/src/catalog/interface.ts +124 -29
  50. package/src/catalog/read-only.ts +18 -18
  51. package/src/client/client.ts +6 -2
  52. package/src/functions/aggregate.ts +3 -0
  53. package/src/functions/copy-from.ts +2 -1
  54. package/src/functions/copy-to.ts +2 -1
  55. package/src/functions/scalar.ts +11 -0
  56. package/src/functions/table-buffering.ts +3 -0
  57. package/src/functions/table-in-out.ts +8 -4
  58. package/src/functions/table.ts +129 -2
  59. package/src/functions/types.ts +40 -0
  60. package/src/generated/vgi-client.ts +63 -1
  61. package/src/generated/vgi-protocol-schemas.ts +240 -14
  62. package/src/http/fetch.ts +117 -2
  63. package/src/index.core.ts +2 -2
  64. package/src/protocol/handlers/aggregate.ts +10 -5
  65. package/src/protocol/handlers/catalog/admin.ts +41 -48
  66. package/src/protocol/handlers/catalog/index_methods.ts +4 -11
  67. package/src/protocol/handlers/catalog/macro.ts +8 -16
  68. package/src/protocol/handlers/catalog/shared.ts +10 -57
  69. package/src/protocol/handlers/catalog/table.ts +33 -96
  70. package/src/protocol/handlers/catalog/view.ts +13 -17
  71. package/src/protocol/handlers/function.ts +311 -18
  72. package/src/protocol/handlers/table-buffering.ts +7 -4
  73. package/src/protocol/serializers/bind.ts +56 -63
  74. package/src/protocol/serializers/cardinality.ts +7 -7
  75. package/src/protocol/serializers/init.ts +52 -10
  76. package/src/protocol/serializers/splits.ts +219 -0
  77. package/src/protocol/state-serializer.ts +55 -1
  78. package/src/protocol/types.ts +27 -0
  79. package/src/request-auth.ts +73 -0
  80. package/src/serve-entry.ts +5 -0
  81. package/src/split-token.ts +297 -0
  82. package/src/worker-cf-entry.ts +2 -1
  83. package/src/worker.ts +30 -10
@@ -97,72 +97,74 @@ function typeSignature(t) {
97
97
  // src/arrow/impl-arrowjs/index.ts
98
98
  var exports_impl_arrowjs = {};
99
99
  __export(exports_impl_arrowjs, {
100
- withBatchMetadata: () => withBatchMetadata,
101
- utf8: () => utf8,
102
- union: () => union,
103
- uint8: () => uint8,
104
- uint64: () => uint64,
105
- uint32: () => uint32,
106
- uint16: () => uint16,
107
- timestamp: () => timestamp,
108
- timeSecond: () => timeSecond,
109
- timeNanosecond: () => timeNanosecond,
110
- timeMillisecond: () => timeMillisecond,
111
- timeMicrosecond: () => timeMicrosecond,
112
- time: () => time,
113
- struct: () => struct,
114
- sparseUnion: () => sparseUnion,
115
- serializeSchema: () => serializeSchema,
116
- serializeBatch: () => serializeBatch,
117
- schema: () => schema,
118
- safeNumber: () => safeNumber,
119
- readCanonicalValue: () => readCanonicalValue,
120
- projectSchema: () => projectSchema,
121
- projectBatch: () => projectBatch,
122
- nullType: () => nullType,
123
- map: () => map,
124
- list: () => list,
125
- iterRows: () => iterRows,
126
- interval: () => interval,
127
- int8: () => int8,
128
- int64: () => int64,
129
- int32: () => int32,
130
- int16: () => int16,
131
- int: () => int,
132
- float64: () => float64,
133
- float32: () => float32,
134
- float16: () => float16,
135
- fixedSizeList: () => fixedSizeList,
136
- fixedSizeBinary: () => fixedSizeBinary,
137
- filterBatch: () => filterBatch,
138
- field: () => field,
139
- emptyBatch: () => emptyBatch,
140
- duration: () => duration,
141
- dictionary: () => dictionary,
142
- deserializeSchema: () => deserializeSchema,
143
- deserializeBatch: () => deserializeBatch,
144
- denseUnion: () => denseUnion,
145
- decodeDictValue: () => decodeDictValue,
146
- decimal256: () => decimal256,
147
- decimal128: () => decimal128,
148
- decimal: () => decimal,
149
- dateMillisecond: () => dateMillisecond,
150
- dateDay: () => dateDay,
151
- date: () => date,
152
- columnFromArray: () => columnFromArray,
153
- buildStatisticsBatch: () => buildStatisticsBatch,
154
- bool: () => bool,
155
- binary: () => binary,
156
- batchToSecretDict: () => batchToSecretDict,
157
- batchToScalarDict: () => batchToScalarDict,
158
- batchFromRows: () => batchFromRows,
159
- batchFromColumns: () => batchFromColumns,
160
- backend: () => backend,
161
- adoptArrowJsShape: () => adoptArrowJsShape,
162
- UnionMode: () => UnionMode,
163
- TimeUnit: () => TimeUnit,
100
+ DateUnit: () => DateUnit,
164
101
  IntervalUnit: () => IntervalUnit,
165
- DateUnit: () => DateUnit
102
+ TimeUnit: () => TimeUnit,
103
+ UnionMode: () => UnionMode,
104
+ adoptArrowJsShape: () => adoptArrowJsShape,
105
+ backend: () => backend,
106
+ batchFromColumns: () => batchFromColumns,
107
+ batchFromRows: () => batchFromRows,
108
+ batchToScalarDict: () => batchToScalarDict,
109
+ batchToSecretDict: () => batchToSecretDict,
110
+ binary: () => binary,
111
+ bool: () => bool,
112
+ buildStatisticsBatch: () => buildStatisticsBatch,
113
+ columnFromArray: () => columnFromArray,
114
+ date: () => date,
115
+ dateDay: () => dateDay,
116
+ dateMillisecond: () => dateMillisecond,
117
+ decimal: () => decimal,
118
+ decimal128: () => decimal128,
119
+ decimal256: () => decimal256,
120
+ decodeDictValue: () => decodeDictValue,
121
+ denseUnion: () => denseUnion,
122
+ deserializeBatch: () => deserializeBatch,
123
+ deserializeSchema: () => deserializeSchema,
124
+ dictionary: () => dictionary,
125
+ duration: () => duration,
126
+ emptyBatch: () => emptyBatch,
127
+ field: () => field,
128
+ filterBatch: () => filterBatch,
129
+ fixedSizeBinary: () => fixedSizeBinary,
130
+ fixedSizeList: () => fixedSizeList,
131
+ float16: () => float16,
132
+ float32: () => float32,
133
+ float64: () => float64,
134
+ int: () => int,
135
+ int16: () => int16,
136
+ int32: () => int32,
137
+ int64: () => int64,
138
+ int8: () => int8,
139
+ interval: () => interval,
140
+ iterRows: () => iterRows,
141
+ largeBinary: () => largeBinary,
142
+ largeUtf8: () => largeUtf8,
143
+ list: () => list,
144
+ map: () => map,
145
+ nullType: () => nullType,
146
+ projectBatch: () => projectBatch,
147
+ projectSchema: () => projectSchema,
148
+ readCanonicalValue: () => readCanonicalValue,
149
+ safeNumber: () => safeNumber,
150
+ schema: () => schema,
151
+ serializeBatch: () => serializeBatch,
152
+ serializeSchema: () => serializeSchema,
153
+ sparseUnion: () => sparseUnion,
154
+ struct: () => struct,
155
+ time: () => time,
156
+ timeMicrosecond: () => timeMicrosecond,
157
+ timeMillisecond: () => timeMillisecond,
158
+ timeNanosecond: () => timeNanosecond,
159
+ timeSecond: () => timeSecond,
160
+ timestamp: () => timestamp,
161
+ uint16: () => uint16,
162
+ uint32: () => uint32,
163
+ uint64: () => uint64,
164
+ uint8: () => uint8,
165
+ union: () => union,
166
+ utf8: () => utf8,
167
+ withBatchMetadata: () => withBatchMetadata
166
168
  });
167
169
 
168
170
  // src/arrow/impl-arrowjs/schema.ts
@@ -183,7 +185,9 @@ import {
183
185
  Float32 as A_Float32,
184
186
  Float64 as A_Float64,
185
187
  Utf8 as A_Utf8,
188
+ LargeUtf8 as A_LargeUtf8,
186
189
  Binary as A_Binary,
190
+ LargeBinary as A_LargeBinary,
187
191
  Decimal as A_Decimal,
188
192
  Date_ as A_Date,
189
193
  Time as A_Time,
@@ -268,7 +272,9 @@ var float16 = () => new A_Float16;
268
272
  var float32 = () => new A_Float32;
269
273
  var float64 = () => new A_Float64;
270
274
  var utf8 = () => new A_Utf8;
275
+ var largeUtf8 = () => new A_LargeUtf8;
271
276
  var binary = () => new A_Binary;
277
+ var largeBinary = () => new A_LargeBinary;
272
278
  var fixedSizeBinary = (byteWidth) => new A_FixedSizeBinary(byteWidth);
273
279
  function decimal(precision, scale, bitWidth = 128) {
274
280
  return new A_Decimal(scale, precision, bitWidth);
@@ -1547,8 +1553,13 @@ function batchToSecretDict(batch) {
1547
1553
  }
1548
1554
  return result;
1549
1555
  }
1556
+ var MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
1557
+ var MIN_SAFE = -MAX_SAFE;
1550
1558
  function safeNumber(value) {
1551
1559
  if (typeof value === "bigint") {
1560
+ if (value > MAX_SAFE || value < MIN_SAFE) {
1561
+ throw new RangeError(`${value} cannot be represented exactly as a JS number ` + `(|value| > Number.MAX_SAFE_INTEGER). Keep it as a bigint.`);
1562
+ }
1552
1563
  return Number(value);
1553
1564
  }
1554
1565
  return value;
@@ -1811,6 +1822,7 @@ var int642 = () => int64();
1811
1822
  var float642 = () => float64();
1812
1823
  var utf82 = () => utf8();
1813
1824
  var binary2 = () => binary();
1825
+ var largeBinary2 = () => largeBinary();
1814
1826
  var UNIT_TO_TAG = {
1815
1827
  [TimeUnit.SECOND]: "s",
1816
1828
  [TimeUnit.MILLISECOND]: "ms",
@@ -2030,10 +2042,19 @@ function inferScalarType(val) {
2030
2042
  }
2031
2043
 
2032
2044
  // src/protocol/serializers/bind.ts
2045
+ var COPY_FROM_STRUCT_TYPE = struct2([
2046
+ field2("format", utf82(), false),
2047
+ field2("file_path", utf82(), false),
2048
+ field2("expected_schema", binary2(), false)
2049
+ ]);
2050
+ var COPY_TO_STRUCT_TYPE = struct2([
2051
+ field2("format", utf82(), false),
2052
+ field2("file_path", utf82(), false)
2053
+ ]);
2033
2054
  var BIND_REQUEST_SCHEMA = schema2([
2034
2055
  field2("function_name", utf82(), false),
2035
2056
  field2("arguments", binary2(), false),
2036
- field2("function_type", utf82(), false),
2057
+ field2("function_type", dictionary2(utf82(), int162()), false),
2037
2058
  field2("input_schema", binary2(), true),
2038
2059
  field2("settings", binary2(), true),
2039
2060
  field2("secrets", binary2(), true),
@@ -2042,28 +2063,12 @@ var BIND_REQUEST_SCHEMA = schema2([
2042
2063
  field2("resolved_secrets_provided", bool2(), false),
2043
2064
  field2("at_unit", utf82(), true),
2044
2065
  field2("at_value", utf82(), true),
2066
+ field2("copy_from", COPY_FROM_STRUCT_TYPE, true),
2067
+ field2("copy_to", COPY_TO_STRUCT_TYPE, true),
2045
2068
  field2("schema_name", utf82(), true)
2046
2069
  ]);
2047
- var COPY_FROM_STRUCT_TYPE = struct2([
2048
- field2("format", utf82(), false),
2049
- field2("file_path", utf82(), false),
2050
- field2("expected_schema", binary2(), false)
2051
- ]);
2052
- var COPY_FROM_FIELD = field2("copy_from", COPY_FROM_STRUCT_TYPE, true);
2053
- var COPY_TO_STRUCT_TYPE = struct2([
2054
- field2("format", utf82(), false),
2055
- field2("file_path", utf82(), false)
2056
- ]);
2057
- var COPY_TO_FIELD = field2("copy_to", COPY_TO_STRUCT_TYPE, true);
2058
- var BIND_RESPONSE_SCHEMA = schema2([
2059
- field2("output_schema", binary2(), false),
2060
- field2("opaque_data", binary2(), true),
2061
- field2("lookup_secret_types", list2(field2("item", utf82(), true)), false),
2062
- field2("lookup_scopes", list2(field2("item", utf82(), true)), false),
2063
- field2("lookup_names", list2(field2("item", utf82(), true)), false)
2064
- ]);
2065
2070
  function serializeBindRequest(req) {
2066
- const row = {
2071
+ return buildSingleRowBatch(BIND_REQUEST_SCHEMA, {
2067
2072
  function_name: req.function_name,
2068
2073
  arguments: serializeArguments(req.arguments),
2069
2074
  function_type: req.function_type,
@@ -2075,29 +2080,14 @@ function serializeBindRequest(req) {
2075
2080
  resolved_secrets_provided: req.resolved_secrets_provided ?? false,
2076
2081
  at_unit: req.at_unit ?? null,
2077
2082
  at_value: req.at_value ?? null,
2078
- schema_name: req.schema_name ?? null
2079
- };
2080
- const extraFields = [];
2081
- if (req.copy_from) {
2082
- extraFields.push(COPY_FROM_FIELD);
2083
- row.copy_from = {
2083
+ copy_from: req.copy_from ? {
2084
2084
  format: req.copy_from.format,
2085
2085
  file_path: req.copy_from.file_path,
2086
2086
  expected_schema: serializeSchema(req.copy_from.expected_schema)
2087
- };
2088
- }
2089
- if (req.copy_to) {
2090
- extraFields.push(COPY_TO_FIELD);
2091
- row.copy_to = {
2092
- format: req.copy_to.format,
2093
- file_path: req.copy_to.file_path
2094
- };
2095
- }
2096
- if (extraFields.length > 0) {
2097
- const schemaWithCopy = schema2([...BIND_REQUEST_SCHEMA.fields, ...extraFields]);
2098
- return buildSingleRowBatch(schemaWithCopy, row);
2099
- }
2100
- return buildSingleRowBatch(BIND_REQUEST_SCHEMA, row);
2087
+ } : null,
2088
+ copy_to: req.copy_to ? { format: req.copy_to.format, file_path: req.copy_to.file_path } : null,
2089
+ schema_name: req.schema_name ?? null
2090
+ });
2101
2091
  }
2102
2092
  function deserializeBindResponse(params) {
2103
2093
  const toStrArray = (val) => {
@@ -2119,20 +2109,22 @@ var INIT_REQUEST_SCHEMA = schema2([
2119
2109
  field2("bind_call", binary2(), false),
2120
2110
  field2("output_schema", binary2(), false),
2121
2111
  field2("bind_opaque_data", binary2(), true),
2122
- field2("projection_ids", list2(field2("item", int642(), false)), true),
2123
- field2("pushdown_filters", binary2(), true),
2124
- field2("join_keys", list2(field2("item", binary2(), true)), false),
2125
- field2("phase", utf82(), true),
2112
+ field2("projection_ids", list2(field2("item", int642(), true)), true),
2113
+ field2("pushdown_filters", largeBinary2(), true),
2114
+ field2("join_keys", list2(field2("item", largeBinary2(), true)), true),
2115
+ field2("split_tokens", list2(field2("item", largeBinary2(), true)), true),
2116
+ field2("row_limit", int642(), true),
2117
+ field2("phase", dictionary2(utf82(), int162()), true),
2118
+ field2("finalize_state_id", binary2(), true),
2126
2119
  field2("execution_id", binary2(), true),
2127
2120
  field2("init_opaque_data", binary2(), true),
2128
2121
  field2("substream_id", binary2(), true),
2129
2122
  field2("order_by_column_name", utf82(), true),
2130
- field2("order_by_direction", utf82(), true),
2131
- field2("order_by_null_order", utf82(), true),
2123
+ field2("order_by_direction", dictionary2(utf82(), int162()), true),
2124
+ field2("order_by_null_order", dictionary2(utf82(), int162()), true),
2132
2125
  field2("order_by_limit", int642(), true),
2133
2126
  field2("tablesample_percentage", float642(), true),
2134
- field2("tablesample_seed", int642(), true),
2135
- field2("finalize_state_id", binary2(), true)
2127
+ field2("tablesample_seed", int642(), true)
2136
2128
  ]);
2137
2129
  var GLOBAL_INIT_RESPONSE_SCHEMA = schema2([
2138
2130
  field2("execution_id", binary2(), false),
@@ -2149,7 +2141,10 @@ function serializeInitRequest(req) {
2149
2141
  projection_ids: req.projection_ids?.map((n) => BigInt(n)) ?? null,
2150
2142
  pushdown_filters: req.pushdown_filters ? serializeBatch(req.pushdown_filters) : null,
2151
2143
  join_keys: (req.join_keys ?? []).map((b) => serializeBatch(b)),
2144
+ split_tokens: req.split_tokens ?? null,
2145
+ row_limit: req.row_limit ?? null,
2152
2146
  phase: req.phase ?? null,
2147
+ finalize_state_id: req.finalize_state_id ?? null,
2153
2148
  execution_id: req.execution_id ?? null,
2154
2149
  init_opaque_data: req.init_opaque_data ?? null,
2155
2150
  substream_id: req.substream_id ?? null,
@@ -2158,8 +2153,7 @@ function serializeInitRequest(req) {
2158
2153
  order_by_null_order: req.order_by_null_order ?? null,
2159
2154
  order_by_limit: req.order_by_limit ?? null,
2160
2155
  tablesample_percentage: req.tablesample_percentage ?? null,
2161
- tablesample_seed: req.tablesample_seed ?? null,
2162
- finalize_state_id: req.finalize_state_id ?? null
2156
+ tablesample_seed: req.tablesample_seed ?? null
2163
2157
  };
2164
2158
  return buildSingleRowBatch(INIT_REQUEST_SCHEMA, row);
2165
2159
  }
@@ -2319,7 +2313,7 @@ var CatalogInfoSchema = schema2([
2319
2313
  field2("implementation_version", utf82(), true),
2320
2314
  field2("data_version_spec", utf82(), true),
2321
2315
  field2("attach_option_specs", list2(field2("item", binary2(), true)), false),
2322
- field2("releases", list2(field2("item", struct2([field2("version", utf82(), false), field2("released_at", timestamp2(TimeUnit2.MICROSECOND, "UTC"), false), field2("summary", utf82(), false), field2("notes_url", utf82(), true)]), true)), false),
2316
+ field2("releases", list2(field2("item", struct2([field2("version", utf82(), false), field2("released_at", timestamp2(TimeUnit2.MICROSECOND, "UTC"), true), field2("summary", utf82(), false), field2("notes_url", utf82(), true)]), true)), false),
2323
2317
  field2("source_url", utf82(), true)
2324
2318
  ]);
2325
2319
  var SchemaInfoSchema = schema2([
@@ -2345,14 +2339,14 @@ var TableInfoSchema = schema2([
2345
2339
  field2("supports_delete", bool2(), false),
2346
2340
  field2("supports_returning", bool2(), false),
2347
2341
  field2("supports_column_statistics", bool2(), false),
2348
- field2("scan_function", binary2(), false),
2349
- field2("insert_function", binary2(), false),
2350
- field2("update_function", binary2(), false),
2351
- field2("delete_function", binary2(), false),
2352
- field2("cardinality_estimate", int642(), false),
2353
- field2("cardinality_max", int642(), false),
2354
- field2("column_statistics", binary2(), false),
2355
- field2("bind_result", binary2(), false),
2342
+ field2("scan_function", binary2(), true),
2343
+ field2("insert_function", binary2(), true),
2344
+ field2("update_function", binary2(), true),
2345
+ field2("delete_function", binary2(), true),
2346
+ field2("cardinality_estimate", int642(), true),
2347
+ field2("cardinality_max", int642(), true),
2348
+ field2("column_statistics", binary2(), true),
2349
+ field2("bind_result", binary2(), true),
2356
2350
  field2("required_filters", list2(field2("item", list2(field2("item", utf82(), true)), true)), false)
2357
2351
  ]);
2358
2352
  var ViewInfoSchema = schema2([
@@ -2382,8 +2376,12 @@ var FunctionInfoSchema = schema2([
2382
2376
  field2("late_materialization", bool2(), true),
2383
2377
  field2("supported_expression_filters", list2(field2("item", utf82(), true)), false),
2384
2378
  field2("order_preservation", dictionary2(utf82(), int162()), true),
2385
- field2("max_workers", int322(), false),
2379
+ field2("max_workers", int322(), true),
2386
2380
  field2("supports_batch_index", bool2(), false),
2381
+ field2("supports_splits", bool2(), false),
2382
+ field2("filters_exactly_applied", bool2(), false),
2383
+ field2("supports_positions", bool2(), false),
2384
+ field2("split_token_ttl_seconds", int642(), true),
2387
2385
  field2("partition_kind", dictionary2(utf82(), int162()), false),
2388
2386
  field2("order_dependent", dictionary2(utf82(), int162()), false),
2389
2387
  field2("distinct_dependent", dictionary2(utf82(), int162()), false),
@@ -2404,9 +2402,9 @@ var MacroInfoSchema = schema2([
2404
2402
  field2("schema_name", utf82(), false),
2405
2403
  field2("macro_type", dictionary2(utf82(), int162()), false),
2406
2404
  field2("parameters", list2(field2("item", utf82(), true)), false),
2407
- field2("parameter_default_values", binary2(), false),
2405
+ field2("parameter_default_values", binary2(), true),
2408
2406
  field2("definition", utf82(), false),
2409
- field2("arguments_schema", binary2(), false)
2407
+ field2("arguments_schema", binary2(), true)
2410
2408
  ]);
2411
2409
  var IndexInfoSchema = schema2([
2412
2410
  field2("comment", utf82(), true),
@@ -2445,7 +2443,22 @@ var ScanBranchSchema = schema2([
2445
2443
  field2("writable", bool2(), false),
2446
2444
  field2("source_catalog", utf82(), true),
2447
2445
  field2("source_schema", utf82(), true),
2448
- field2("source_table", utf82(), true)
2446
+ field2("source_table", utf82(), true),
2447
+ field2("format_name", utf82(), true),
2448
+ field2("format_locations", list2(field2("item", utf82(), true)), true),
2449
+ field2("format_options", binary2(), true)
2450
+ ]);
2451
+ var ScanSplitSchema = schema2([
2452
+ field2("payload", binary2(), false),
2453
+ field2("token", binary2(), false),
2454
+ field2("estimated_rows", int642(), true),
2455
+ field2("rows_exact", bool2(), false),
2456
+ field2("estimated_bytes", int642(), true),
2457
+ field2("partition_bounds", binary2(), true),
2458
+ field2("column_statistics", binary2(), true),
2459
+ field2("location_ids", list2(field2("item", int642(), true)), true),
2460
+ field2("start_position", binary2(), true),
2461
+ field2("end_position", binary2(), true)
2449
2462
  ]);
2450
2463
  var AttachCatalogInfoSchema = schema2([
2451
2464
  field2("alias", utf82(), false),
@@ -2456,6 +2469,152 @@ var AttachCatalogInfoSchema = schema2([
2456
2469
  field2("required", bool2(), false),
2457
2470
  field2("secret_ref", utf82(), false)
2458
2471
  ]);
2472
+ var AggregateBindRequestSchema = schema2([
2473
+ field2("function_name", utf82(), false),
2474
+ field2("arguments", binary2(), false),
2475
+ field2("input_schema", binary2(), true),
2476
+ field2("settings", binary2(), true),
2477
+ field2("secrets", binary2(), true),
2478
+ field2("attach_opaque_data", binary2(), true),
2479
+ field2("schema_name", utf82(), true)
2480
+ ]);
2481
+ var AggregateCombineRequestSchema = schema2([
2482
+ field2("function_name", utf82(), false),
2483
+ field2("execution_id", binary2(), false),
2484
+ field2("merge_batch", binary2(), false),
2485
+ field2("attach_opaque_data", binary2(), true),
2486
+ field2("schema_name", utf82(), true)
2487
+ ]);
2488
+ var AggregateDestructorRequestSchema = schema2([
2489
+ field2("function_name", utf82(), false),
2490
+ field2("execution_id", binary2(), false),
2491
+ field2("group_ids_batch", binary2(), false),
2492
+ field2("attach_opaque_data", binary2(), true),
2493
+ field2("schema_name", utf82(), true)
2494
+ ]);
2495
+ var AggregateFinalizeRequestSchema = schema2([
2496
+ field2("function_name", utf82(), false),
2497
+ field2("execution_id", binary2(), false),
2498
+ field2("group_ids_batch", binary2(), false),
2499
+ field2("output_schema", binary2(), false),
2500
+ field2("attach_opaque_data", binary2(), true),
2501
+ field2("schema_name", utf82(), true)
2502
+ ]);
2503
+ var AggregateUpdateRequestSchema = schema2([
2504
+ field2("function_name", utf82(), false),
2505
+ field2("execution_id", binary2(), false),
2506
+ field2("input_batch", binary2(), false),
2507
+ field2("attach_opaque_data", binary2(), true),
2508
+ field2("schema_name", utf82(), true)
2509
+ ]);
2510
+ var BindRequestSchema = schema2([
2511
+ field2("function_name", utf82(), false),
2512
+ field2("arguments", binary2(), false),
2513
+ field2("function_type", dictionary2(utf82(), int162()), false),
2514
+ field2("input_schema", binary2(), true),
2515
+ field2("settings", binary2(), true),
2516
+ field2("secrets", binary2(), true),
2517
+ field2("attach_opaque_data", binary2(), true),
2518
+ field2("transaction_opaque_data", binary2(), true),
2519
+ field2("resolved_secrets_provided", bool2(), false),
2520
+ field2("at_unit", utf82(), true),
2521
+ field2("at_value", utf82(), true),
2522
+ field2("copy_from", struct2([field2("format", utf82(), false), field2("file_path", utf82(), false), field2("expected_schema", binary2(), false)]), true),
2523
+ field2("copy_to", struct2([field2("format", utf82(), false), field2("file_path", utf82(), false)]), true),
2524
+ field2("schema_name", utf82(), true)
2525
+ ]);
2526
+ var CatalogAttachRequestSchema = schema2([
2527
+ field2("name", utf82(), false),
2528
+ field2("options", binary2(), true),
2529
+ field2("data_version_spec", utf82(), true),
2530
+ field2("implementation_version", utf82(), true),
2531
+ field2("client_capabilities", binary2(), true)
2532
+ ]);
2533
+ var CopyFromContextSchema = schema2([
2534
+ field2("format", utf82(), false),
2535
+ field2("file_path", utf82(), false),
2536
+ field2("expected_schema", binary2(), false)
2537
+ ]);
2538
+ var CopyToContextSchema = schema2([
2539
+ field2("format", utf82(), false),
2540
+ field2("file_path", utf82(), false)
2541
+ ]);
2542
+ var GlobalInitResponseSchema = schema2([
2543
+ field2("execution_id", binary2(), false),
2544
+ field2("opaque_data", binary2(), true),
2545
+ field2("max_workers", int642(), false)
2546
+ ]);
2547
+ var InitRequestSchema = schema2([
2548
+ field2("bind_call", binary2(), false),
2549
+ field2("output_schema", binary2(), false),
2550
+ field2("bind_opaque_data", binary2(), true),
2551
+ field2("projection_ids", list2(field2("item", int642(), true)), true),
2552
+ field2("pushdown_filters", largeBinary2(), true),
2553
+ field2("join_keys", list2(field2("item", largeBinary2(), true)), true),
2554
+ field2("split_tokens", list2(field2("item", largeBinary2(), true)), true),
2555
+ field2("row_limit", int642(), true),
2556
+ field2("phase", dictionary2(utf82(), int162()), true),
2557
+ field2("finalize_state_id", binary2(), true),
2558
+ field2("execution_id", binary2(), true),
2559
+ field2("init_opaque_data", binary2(), true),
2560
+ field2("substream_id", binary2(), true),
2561
+ field2("order_by_column_name", utf82(), true),
2562
+ field2("order_by_direction", dictionary2(utf82(), int162()), true),
2563
+ field2("order_by_null_order", dictionary2(utf82(), int162()), true),
2564
+ field2("order_by_limit", int642(), true),
2565
+ field2("tablesample_percentage", float642(), true),
2566
+ field2("tablesample_seed", int642(), true)
2567
+ ]);
2568
+ var TableBufferingCombineRequestSchema = schema2([
2569
+ field2("function_name", utf82(), false),
2570
+ field2("execution_id", binary2(), false),
2571
+ field2("state_ids", list2(field2("item", binary2(), true)), false),
2572
+ field2("attach_opaque_data", binary2(), true),
2573
+ field2("transaction_id", binary2(), true),
2574
+ field2("schema_name", utf82(), true)
2575
+ ]);
2576
+ var TableBufferingDestructorRequestSchema = schema2([
2577
+ field2("function_name", utf82(), false),
2578
+ field2("execution_id", binary2(), false),
2579
+ field2("attach_opaque_data", binary2(), true),
2580
+ field2("transaction_id", binary2(), true),
2581
+ field2("schema_name", utf82(), true)
2582
+ ]);
2583
+ var TableBufferingProcessRequestSchema = schema2([
2584
+ field2("function_name", utf82(), false),
2585
+ field2("execution_id", binary2(), false),
2586
+ field2("input_batch", binary2(), false),
2587
+ field2("attach_opaque_data", binary2(), true),
2588
+ field2("transaction_id", binary2(), true),
2589
+ field2("batch_index", int642(), true),
2590
+ field2("schema_name", utf82(), true)
2591
+ ]);
2592
+ var TableFunctionCardinalityRequestSchema = schema2([
2593
+ field2("bind_call", binary2(), false),
2594
+ field2("bind_opaque_data", binary2(), true)
2595
+ ]);
2596
+ var TableFunctionPlanRequestSchema = schema2([
2597
+ field2("bind_call", binary2(), false),
2598
+ field2("bind_opaque_data", binary2(), true),
2599
+ field2("projection_ids", list2(field2("item", int642(), true)), true),
2600
+ field2("pushdown_filters", largeBinary2(), true),
2601
+ field2("join_keys", list2(field2("item", largeBinary2(), true)), true),
2602
+ field2("row_limit", int642(), true),
2603
+ field2("target_split_bytes", int642(), true),
2604
+ field2("min_splits", int642(), true),
2605
+ field2("max_splits_per_response", int642(), true),
2606
+ field2("cursor", binary2(), true),
2607
+ field2("refined_filters", largeBinary2(), true),
2608
+ field2("filters_complete", bool2(), false),
2609
+ field2("start_position", binary2(), true),
2610
+ field2("end_position", binary2(), true),
2611
+ field2("order_by_column_name", utf82(), true),
2612
+ field2("order_by_direction", dictionary2(utf82(), int162()), true),
2613
+ field2("order_by_null_order", dictionary2(utf82(), int162()), true),
2614
+ field2("order_by_limit", int642(), true),
2615
+ field2("tablesample_percentage", float642(), true),
2616
+ field2("tablesample_seed", int642(), true)
2617
+ ]);
2459
2618
  var AggregateBindResultSchema = schema2([
2460
2619
  field2("output_schema", binary2(), false),
2461
2620
  field2("execution_id", binary2(), false)
@@ -2483,7 +2642,7 @@ var AggregateWindowDestructorResultSchema = schema2([]);
2483
2642
  var AggregateWindowInitResultSchema = schema2([]);
2484
2643
  var BindResultSchema = schema2([
2485
2644
  field2("output_schema", binary2(), false),
2486
- field2("opaque_data", binary2(), false),
2645
+ field2("opaque_data", binary2(), true),
2487
2646
  field2("lookup_secret_types", list2(field2("item", utf82(), true)), false),
2488
2647
  field2("lookup_scopes", list2(field2("item", utf82(), true)), false),
2489
2648
  field2("lookup_names", list2(field2("item", utf82(), true)), false)
@@ -2567,6 +2726,24 @@ var TableFunctionDynamicToStringResultSchema = schema2([
2567
2726
  field2("keys", list2(field2("item", utf82(), true)), false),
2568
2727
  field2("values", list2(field2("item", utf82(), true)), false)
2569
2728
  ]);
2729
+ var TableFunctionPlanResultSchema = schema2([
2730
+ field2("splits", list2(field2("item", binary2(), true)), false),
2731
+ field2("next_cursors", list2(field2("item", binary2(), true)), true),
2732
+ field2("execution_id", binary2(), true),
2733
+ field2("init_opaque_data", binary2(), true),
2734
+ field2("max_workers", int642(), true),
2735
+ field2("estimated_total_splits", int642(), true),
2736
+ field2("estimated_total_rows", int642(), true),
2737
+ field2("estimated_total_bytes", int642(), true),
2738
+ field2("catalog_version", int642(), true),
2739
+ field2("scope", utf82(), false),
2740
+ field2("locations", list2(field2("item", utf82(), true)), true),
2741
+ field2("partitioning", list2(field2("item", binary2(), true)), true),
2742
+ field2("sort_order", list2(field2("item", binary2(), true)), true),
2743
+ field2("cache_max_age_seconds", int642(), true),
2744
+ field2("start_position", binary2(), true),
2745
+ field2("end_position", binary2(), true)
2746
+ ]);
2570
2747
  var AggregateBindParamsSchema = schema2([
2571
2748
  field2("request", binary2(), false)
2572
2749
  ]);
@@ -2933,6 +3110,9 @@ var TableFunctionCardinalityParamsSchema = schema2([
2933
3110
  var TableFunctionDynamicToStringParamsSchema = schema2([
2934
3111
  field2("request", binary2(), false)
2935
3112
  ]);
3113
+ var TableFunctionPlanParamsSchema = schema2([
3114
+ field2("request", binary2(), false)
3115
+ ]);
2936
3116
  var TableFunctionStatisticsParamsSchema = schema2([
2937
3117
  field2("request", binary2(), false)
2938
3118
  ]);
@@ -3152,6 +3332,8 @@ class VgiClient {
3152
3332
  bind_call: bindRequest,
3153
3333
  output_schema: bindResponse.output_schema,
3154
3334
  bind_opaque_data: bindResponse.opaque_data,
3335
+ split_tokens: null,
3336
+ row_limit: null,
3155
3337
  projection_ids: opts?.projectionIds ?? null,
3156
3338
  pushdown_filters: opts?.pushdownFilters ?? null,
3157
3339
  join_keys: opts?.joinKeys ?? [],
@@ -3790,7 +3972,7 @@ class VgiClient {
3790
3972
  }
3791
3973
  async macroCreate(attachOpaqueData, schemaName, name, macroType, parameters, definition, onConflict, parameterDefaultValues, argumentsSchema, transactionOpaqueData) {
3792
3974
  const schema3 = schema2([
3793
- field2("attach_opaque_data", binary2(), true),
3975
+ field2("attach_opaque_data", binary2(), false),
3794
3976
  field2("schema_name", utf82(), false),
3795
3977
  field2("name", utf82(), false),
3796
3978
  field2("macro_type", utf82(), false),
@@ -3953,54 +4135,54 @@ function deserializeAttachOptionSpecs(specs) {
3953
4135
  return Array.from(specs, deserializeAttachOptionSpec);
3954
4136
  }
3955
4137
  export {
3956
- typeSignature,
3957
- toUint8Array,
3958
- serializeSchema,
3959
- serializeBatch,
3960
- schemaToArgumentSpecs,
3961
- safeNumber,
3962
- projectSchema,
3963
- projectBatch,
3964
- iterRows,
3965
- filterBatch,
3966
- encodeViewInfo,
3967
- encodeTableInfo,
3968
- encodeSchemaInfo,
3969
- encodeMacroInfo,
3970
- encodeFunctionInfo,
3971
- emptyBatch,
3972
- deserializeSchema,
3973
- deserializeBatch,
3974
- deserializeAttachOptionSpecs,
3975
- deserializeAttachOptionSpec,
3976
- decodeViewInfo,
3977
- decodeTableInfo,
3978
- decodeSchemaInfo,
3979
- decodeMacroInfo,
3980
- decodeFunctionInfo,
3981
- batchToScalarDict,
3982
- batchFromRows,
3983
- batchFromColumns,
3984
- argumentSpecsToSchema,
3985
- VgiError,
3986
- VgiClientError,
3987
- VgiClient,
3988
- TypeId,
3989
- TableInOutPhase,
3990
- RowCountMismatchError,
3991
- OrderPreservation,
3992
- OrderDependence,
3993
- NullHandling,
3994
- NoCatalogError,
3995
- FunctionType,
3996
- FunctionStability,
3997
- FunctionNotFoundError,
3998
- DistinctDependence,
3999
- CatalogReadOnlyError,
4000
- CatalogNotFoundError,
4001
- CatalogAlreadyExistsError,
4138
+ ArgumentValidationError,
4002
4139
  Arguments,
4003
- ArgumentValidationError
4140
+ CatalogAlreadyExistsError,
4141
+ CatalogNotFoundError,
4142
+ CatalogReadOnlyError,
4143
+ DistinctDependence,
4144
+ FunctionNotFoundError,
4145
+ FunctionStability,
4146
+ FunctionType,
4147
+ NoCatalogError,
4148
+ NullHandling,
4149
+ OrderDependence,
4150
+ OrderPreservation,
4151
+ RowCountMismatchError,
4152
+ TableInOutPhase,
4153
+ TypeId,
4154
+ VgiClient,
4155
+ VgiClientError,
4156
+ VgiError,
4157
+ argumentSpecsToSchema,
4158
+ batchFromColumns,
4159
+ batchFromRows,
4160
+ batchToScalarDict,
4161
+ decodeFunctionInfo,
4162
+ decodeMacroInfo,
4163
+ decodeSchemaInfo,
4164
+ decodeTableInfo,
4165
+ decodeViewInfo,
4166
+ deserializeAttachOptionSpec,
4167
+ deserializeAttachOptionSpecs,
4168
+ deserializeBatch,
4169
+ deserializeSchema,
4170
+ emptyBatch,
4171
+ encodeFunctionInfo,
4172
+ encodeMacroInfo,
4173
+ encodeSchemaInfo,
4174
+ encodeTableInfo,
4175
+ encodeViewInfo,
4176
+ filterBatch,
4177
+ iterRows,
4178
+ projectBatch,
4179
+ projectSchema,
4180
+ safeNumber,
4181
+ schemaToArgumentSpecs,
4182
+ serializeBatch,
4183
+ serializeSchema,
4184
+ toUint8Array,
4185
+ typeSignature
4004
4186
  };
4005
4187
 
4006
- //# debugId=07C8934BE302A34C64756E2164756E21
4188
+ //# debugId=96F67925F48EAE1464756E2164756E21