@query-farm/vgi 0.47.2 → 0.48.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.
- package/README.md +1 -1
- package/dist/client-entry.js +26 -1
- package/dist/client-entry.js.map +5 -5
- package/dist/generated/vgi-client.d.ts +5 -0
- package/dist/generated/vgi-protocol-schemas.d.ts +5 -0
- package/dist/generated/vgi-protocol-types.d.ts +57 -0
- package/dist/generated/vgi-service.d.ts +1 -1
- package/dist/index.core.d.ts +2 -0
- package/dist/index.js +135 -10
- package/dist/index.js.map +11 -10
- package/dist/protocol/dispatch.d.ts +1 -1
- package/dist/protocol/serializers/splits.d.ts +41 -1
- package/dist/serve-entry.js +78 -10
- package/dist/serve-entry.js.map +10 -9
- package/dist/worker-cf-entry.js +80 -10
- package/dist/worker-cf-entry.js.map +11 -10
- package/package.json +1 -1
- package/src/generated/vgi-client.ts +6 -1
- package/src/generated/vgi-protocol-schemas.ts +36 -1
- package/src/generated/vgi-protocol-types.ts +130 -1
- package/src/generated/vgi-service.ts +2 -2
- package/src/index.core.ts +32 -0
- package/src/protocol/dispatch.ts +1 -1
- package/src/protocol/serializers/splits.ts +82 -9
package/dist/worker-cf-entry.js
CHANGED
|
@@ -4459,6 +4459,20 @@ function deserializeBindResponse(params) {
|
|
|
4459
4459
|
}
|
|
4460
4460
|
// src/protocol/serializers/init.ts
|
|
4461
4461
|
init_arrow();
|
|
4462
|
+
|
|
4463
|
+
// src/protocol/types.ts
|
|
4464
|
+
var OrderByDirection;
|
|
4465
|
+
((OrderByDirection) => {
|
|
4466
|
+
OrderByDirection["ASC"] = "ASC";
|
|
4467
|
+
OrderByDirection["DESC"] = "DESC";
|
|
4468
|
+
})(OrderByDirection ||= {});
|
|
4469
|
+
var OrderByNullOrder;
|
|
4470
|
+
((OrderByNullOrder) => {
|
|
4471
|
+
OrderByNullOrder["NULLS_FIRST"] = "NULLS_FIRST";
|
|
4472
|
+
OrderByNullOrder["NULLS_LAST"] = "NULLS_LAST";
|
|
4473
|
+
})(OrderByNullOrder ||= {});
|
|
4474
|
+
|
|
4475
|
+
// src/protocol/serializers/init.ts
|
|
4462
4476
|
var INIT_REQUEST_SCHEMA = schema2([
|
|
4463
4477
|
field2("bind_call", binary2(), false),
|
|
4464
4478
|
field2("output_schema", binary2(), false),
|
|
@@ -4901,7 +4915,7 @@ import {
|
|
|
4901
4915
|
Protocol
|
|
4902
4916
|
} from "@query-farm/vgi-rpc";
|
|
4903
4917
|
var VGI_PROTOCOL_NAME = "vgi.v3";
|
|
4904
|
-
var VGI_PROTOCOL_VERSION = "3.
|
|
4918
|
+
var VGI_PROTOCOL_VERSION = "3.1.0";
|
|
4905
4919
|
function exchangeStream(callbacks) {
|
|
4906
4920
|
return { kind: "exchange", ...callbacks };
|
|
4907
4921
|
}
|
|
@@ -6501,6 +6515,26 @@ var CopyFromFormatInfoSchema = schema2([
|
|
|
6501
6515
|
field2("description", utf82(), false),
|
|
6502
6516
|
field2("ordered", bool2(), false)
|
|
6503
6517
|
]);
|
|
6518
|
+
var FieldPathSchema = schema2([
|
|
6519
|
+
field2("components", list2(field2("item", utf82(), true)), false)
|
|
6520
|
+
]);
|
|
6521
|
+
var TransformSpecSchema = schema2([
|
|
6522
|
+
field2("id", utf82(), false),
|
|
6523
|
+
field2("inputs", list2(field2("item", binary2(), true)), false),
|
|
6524
|
+
field2("parameters", binary2(), true)
|
|
6525
|
+
]);
|
|
6526
|
+
var KeyGroupingSchema = schema2([
|
|
6527
|
+
field2("keys", list2(field2("item", binary2(), true)), false)
|
|
6528
|
+
]);
|
|
6529
|
+
var RangeKeySchema = schema2([
|
|
6530
|
+
field2("transform", binary2(), false),
|
|
6531
|
+
field2("direction", dictionary2(utf82(), int162()), false),
|
|
6532
|
+
field2("null_order", dictionary2(utf82(), int162()), false)
|
|
6533
|
+
]);
|
|
6534
|
+
var RangePartitioningSchema = schema2([
|
|
6535
|
+
field2("keys", list2(field2("item", binary2(), true)), false),
|
|
6536
|
+
field2("split_points", binary2(), false)
|
|
6537
|
+
]);
|
|
6504
6538
|
var MacroParameterSchema = schema2([
|
|
6505
6539
|
field2("name", utf82(), false),
|
|
6506
6540
|
field2("declared_type", binary2(), true),
|
|
@@ -6731,6 +6765,9 @@ var ScanSplitSchema = schema2([
|
|
|
6731
6765
|
field2("estimated_rows", int642(), true),
|
|
6732
6766
|
field2("rows_exact", bool2(), false),
|
|
6733
6767
|
field2("estimated_bytes", int642(), true),
|
|
6768
|
+
field2("key_value", binary2(), true),
|
|
6769
|
+
field2("range_index", int642(), true),
|
|
6770
|
+
field2("column_bounds", binary2(), true),
|
|
6734
6771
|
field2("partition_bounds", binary2(), true),
|
|
6735
6772
|
field2("column_statistics", binary2(), true),
|
|
6736
6773
|
field2("location_ids", list2(field2("item", int642(), true)), true),
|
|
@@ -7206,6 +7243,8 @@ var TableFunctionPlanResultSchema = schema2([
|
|
|
7206
7243
|
field2("catalog_version", int642(), true),
|
|
7207
7244
|
field2("scope", utf82(), false),
|
|
7208
7245
|
field2("locations", list2(field2("item", utf82(), true)), true),
|
|
7246
|
+
field2("key_grouping", binary2(), true),
|
|
7247
|
+
field2("range_partitioning", binary2(), true),
|
|
7209
7248
|
field2("partitioning", list2(field2("item", binary2(), true)), true),
|
|
7210
7249
|
field2("sort_order", list2(field2("item", binary2(), true)), true),
|
|
7211
7250
|
field2("cache_max_age_seconds", int642(), true),
|
|
@@ -10016,14 +10055,40 @@ function deserializePlanRequest(params) {
|
|
|
10016
10055
|
projectionIds = [...raw].map(Number);
|
|
10017
10056
|
}
|
|
10018
10057
|
const asBigInt = (v) => v == null ? null : typeof v === "bigint" ? v : BigInt(Number(v));
|
|
10058
|
+
const asBytes = (v) => v == null ? null : toUint8Array2(v);
|
|
10059
|
+
const asBytesList = (v) => {
|
|
10060
|
+
if (v == null)
|
|
10061
|
+
return null;
|
|
10062
|
+
const values = Array.isArray(v) ? v : v && typeof v[Symbol.iterator] === "function" ? [...v] : [];
|
|
10063
|
+
return values.filter((entry) => entry != null).map(toUint8Array2);
|
|
10064
|
+
};
|
|
10065
|
+
const enumValue = (v, values) => {
|
|
10066
|
+
if (v == null)
|
|
10067
|
+
return null;
|
|
10068
|
+
const text = String(v);
|
|
10069
|
+
return values.includes(text) ? text : null;
|
|
10070
|
+
};
|
|
10019
10071
|
return {
|
|
10020
10072
|
bind_call: bindCall,
|
|
10021
|
-
bind_opaque_data:
|
|
10073
|
+
bind_opaque_data: asBytes(params.bind_opaque_data),
|
|
10022
10074
|
projection_ids: projectionIds,
|
|
10023
|
-
pushdown_filters:
|
|
10075
|
+
pushdown_filters: asBytes(params.pushdown_filters),
|
|
10076
|
+
join_keys: asBytesList(params.join_keys),
|
|
10077
|
+
row_limit: asBigInt(params.row_limit),
|
|
10024
10078
|
target_split_bytes: asBigInt(params.target_split_bytes),
|
|
10025
10079
|
min_splits: asBigInt(params.min_splits),
|
|
10026
|
-
|
|
10080
|
+
max_splits_per_response: asBigInt(params.max_splits_per_response),
|
|
10081
|
+
cursor: asBytes(params.cursor),
|
|
10082
|
+
refined_filters: asBytes(params.refined_filters),
|
|
10083
|
+
filters_complete: params.filters_complete == null ? true : Boolean(params.filters_complete),
|
|
10084
|
+
start_position: asBytes(params.start_position),
|
|
10085
|
+
end_position: asBytes(params.end_position),
|
|
10086
|
+
order_by_column_name: params.order_by_column_name == null ? null : String(params.order_by_column_name),
|
|
10087
|
+
order_by_direction: enumValue(params.order_by_direction, Object.values(OrderByDirection)),
|
|
10088
|
+
order_by_null_order: enumValue(params.order_by_null_order, Object.values(OrderByNullOrder)),
|
|
10089
|
+
order_by_limit: asBigInt(params.order_by_limit),
|
|
10090
|
+
tablesample_percentage: params.tablesample_percentage == null ? null : Number(params.tablesample_percentage),
|
|
10091
|
+
tablesample_seed: asBigInt(params.tablesample_seed)
|
|
10027
10092
|
};
|
|
10028
10093
|
}
|
|
10029
10094
|
function fingerprintInputs(bindCallBytes) {
|
|
@@ -10043,6 +10108,9 @@ function scanSplitRow(split, token) {
|
|
|
10043
10108
|
estimated_rows: asBigInt(split.estimatedRows),
|
|
10044
10109
|
rows_exact: split.rowsExact === true,
|
|
10045
10110
|
estimated_bytes: asBigInt(split.estimatedBytes),
|
|
10111
|
+
key_value: split.keyValue ?? null,
|
|
10112
|
+
range_index: asBigInt(split.rangeIndex),
|
|
10113
|
+
column_bounds: split.columnBounds ?? null,
|
|
10046
10114
|
partition_bounds: split.partitionBounds ?? null,
|
|
10047
10115
|
column_statistics: split.columnStatistics ?? null,
|
|
10048
10116
|
location_ids: split.locationIds ?? null,
|
|
@@ -10063,12 +10131,14 @@ function planResponseRow(result, splitBlobs) {
|
|
|
10063
10131
|
estimated_total_bytes: asBigInt(result.estimatedTotalBytes),
|
|
10064
10132
|
catalog_version: asBigInt(result.catalogVersion),
|
|
10065
10133
|
scope: result.scope ?? "catalog",
|
|
10066
|
-
locations: null,
|
|
10067
|
-
|
|
10068
|
-
|
|
10134
|
+
locations: result.locations ?? null,
|
|
10135
|
+
key_grouping: result.keyGrouping ?? null,
|
|
10136
|
+
range_partitioning: result.rangePartitioning ?? null,
|
|
10137
|
+
partitioning: result.partitioning ?? null,
|
|
10138
|
+
sort_order: result.sortOrder ?? null,
|
|
10069
10139
|
cache_max_age_seconds: asBigInt(result.cacheMaxAgeSeconds),
|
|
10070
|
-
start_position:
|
|
10071
|
-
end_position:
|
|
10140
|
+
start_position: result.startPosition ?? null,
|
|
10141
|
+
end_position: result.endPosition ?? null
|
|
10072
10142
|
};
|
|
10073
10143
|
}
|
|
10074
10144
|
|
|
@@ -16786,4 +16856,4 @@ export {
|
|
|
16786
16856
|
validateTableConstraints
|
|
16787
16857
|
};
|
|
16788
16858
|
|
|
16789
|
-
//# debugId=
|
|
16859
|
+
//# debugId=BAA5461FE644FC2564756E2164756E21
|