@lancedb/lancedb 0.41.0-beta.8 → 0.41.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/CONTRIBUTING.md +13 -0
- package/dist/arrow.d.ts +1 -0
- package/dist/arrow.js +16 -5
- package/dist/blob.d.ts +24 -1
- package/dist/blob.js +56 -5
- package/dist/catalog.d.ts +6 -1
- package/dist/catalog.js +6 -2
- package/dist/connection.d.ts +26 -79
- package/dist/connection.js +28 -26
- package/dist/embedding/transformers.js +4 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -5
- package/dist/indices.d.ts +2 -1
- package/dist/job.d.ts +8 -5
- package/dist/job.js +8 -5
- package/dist/materialized_view.d.ts +7 -3
- package/dist/materialized_view.js +7 -4
- package/dist/merge.d.ts +7 -7
- package/dist/merge.js +8 -8
- package/dist/native.d.ts +72 -73
- package/dist/native.js +53 -52
- package/dist/query.d.ts +18 -16
- package/dist/query.js +73 -36
- package/dist/table.d.ts +57 -48
- package/dist/table.js +18 -18
- package/package.json +10 -9
package/dist/native.js
CHANGED
|
@@ -76,8 +76,8 @@ function requireNative() {
|
|
|
76
76
|
try {
|
|
77
77
|
const binding = require('@lancedb/lancedb-android-arm64');
|
|
78
78
|
const bindingPackageVersion = require('@lancedb/lancedb-android-arm64/package.json').version;
|
|
79
|
-
if (bindingPackageVersion !== '0.41.0
|
|
80
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
79
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
80
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
81
81
|
}
|
|
82
82
|
return binding;
|
|
83
83
|
}
|
|
@@ -95,8 +95,8 @@ function requireNative() {
|
|
|
95
95
|
try {
|
|
96
96
|
const binding = require('@lancedb/lancedb-android-arm-eabi');
|
|
97
97
|
const bindingPackageVersion = require('@lancedb/lancedb-android-arm-eabi/package.json').version;
|
|
98
|
-
if (bindingPackageVersion !== '0.41.0
|
|
99
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
98
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
99
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
100
100
|
}
|
|
101
101
|
return binding;
|
|
102
102
|
}
|
|
@@ -120,8 +120,8 @@ function requireNative() {
|
|
|
120
120
|
try {
|
|
121
121
|
const binding = require('@lancedb/lancedb-win32-x64-gnu');
|
|
122
122
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-gnu/package.json').version;
|
|
123
|
-
if (bindingPackageVersion !== '0.41.0
|
|
124
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
123
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
124
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
125
125
|
}
|
|
126
126
|
return binding;
|
|
127
127
|
}
|
|
@@ -139,8 +139,8 @@ function requireNative() {
|
|
|
139
139
|
try {
|
|
140
140
|
const binding = require('@lancedb/lancedb-win32-x64-msvc');
|
|
141
141
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-x64-msvc/package.json').version;
|
|
142
|
-
if (bindingPackageVersion !== '0.41.0
|
|
143
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
142
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
143
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
144
144
|
}
|
|
145
145
|
return binding;
|
|
146
146
|
}
|
|
@@ -159,8 +159,8 @@ function requireNative() {
|
|
|
159
159
|
try {
|
|
160
160
|
const binding = require('@lancedb/lancedb-win32-ia32-msvc');
|
|
161
161
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-ia32-msvc/package.json').version;
|
|
162
|
-
if (bindingPackageVersion !== '0.41.0
|
|
163
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
162
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
163
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
164
164
|
}
|
|
165
165
|
return binding;
|
|
166
166
|
}
|
|
@@ -178,8 +178,8 @@ function requireNative() {
|
|
|
178
178
|
try {
|
|
179
179
|
const binding = require('@lancedb/lancedb-win32-arm64-msvc');
|
|
180
180
|
const bindingPackageVersion = require('@lancedb/lancedb-win32-arm64-msvc/package.json').version;
|
|
181
|
-
if (bindingPackageVersion !== '0.41.0
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
181
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
182
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
183
183
|
}
|
|
184
184
|
return binding;
|
|
185
185
|
}
|
|
@@ -201,8 +201,8 @@ function requireNative() {
|
|
|
201
201
|
try {
|
|
202
202
|
const binding = require('@lancedb/lancedb-darwin-universal');
|
|
203
203
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-universal/package.json').version;
|
|
204
|
-
if (bindingPackageVersion !== '0.41.0
|
|
205
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
204
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
205
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
206
206
|
}
|
|
207
207
|
return binding;
|
|
208
208
|
}
|
|
@@ -219,8 +219,8 @@ function requireNative() {
|
|
|
219
219
|
try {
|
|
220
220
|
const binding = require('@lancedb/lancedb-darwin-x64');
|
|
221
221
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-x64/package.json').version;
|
|
222
|
-
if (bindingPackageVersion !== '0.41.0
|
|
223
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
222
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
223
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
224
224
|
}
|
|
225
225
|
return binding;
|
|
226
226
|
}
|
|
@@ -238,8 +238,8 @@ function requireNative() {
|
|
|
238
238
|
try {
|
|
239
239
|
const binding = require('@lancedb/lancedb-darwin-arm64');
|
|
240
240
|
const bindingPackageVersion = require('@lancedb/lancedb-darwin-arm64/package.json').version;
|
|
241
|
-
if (bindingPackageVersion !== '0.41.0
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
241
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
243
243
|
}
|
|
244
244
|
return binding;
|
|
245
245
|
}
|
|
@@ -262,8 +262,8 @@ function requireNative() {
|
|
|
262
262
|
try {
|
|
263
263
|
const binding = require('@lancedb/lancedb-freebsd-x64');
|
|
264
264
|
const bindingPackageVersion = require('@lancedb/lancedb-freebsd-x64/package.json').version;
|
|
265
|
-
if (bindingPackageVersion !== '0.41.0
|
|
266
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
265
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
266
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
267
267
|
}
|
|
268
268
|
return binding;
|
|
269
269
|
}
|
|
@@ -281,8 +281,8 @@ function requireNative() {
|
|
|
281
281
|
try {
|
|
282
282
|
const binding = require('@lancedb/lancedb-freebsd-arm64');
|
|
283
283
|
const bindingPackageVersion = require('@lancedb/lancedb-freebsd-arm64/package.json').version;
|
|
284
|
-
if (bindingPackageVersion !== '0.41.0
|
|
285
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
284
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
285
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
286
286
|
}
|
|
287
287
|
return binding;
|
|
288
288
|
}
|
|
@@ -306,8 +306,8 @@ function requireNative() {
|
|
|
306
306
|
try {
|
|
307
307
|
const binding = require('@lancedb/lancedb-linux-x64-musl');
|
|
308
308
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-musl/package.json').version;
|
|
309
|
-
if (bindingPackageVersion !== '0.41.0
|
|
310
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
309
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
310
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
311
311
|
}
|
|
312
312
|
return binding;
|
|
313
313
|
}
|
|
@@ -325,8 +325,8 @@ function requireNative() {
|
|
|
325
325
|
try {
|
|
326
326
|
const binding = require('@lancedb/lancedb-linux-x64-gnu');
|
|
327
327
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-x64-gnu/package.json').version;
|
|
328
|
-
if (bindingPackageVersion !== '0.41.0
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
328
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
330
330
|
}
|
|
331
331
|
return binding;
|
|
332
332
|
}
|
|
@@ -346,8 +346,8 @@ function requireNative() {
|
|
|
346
346
|
try {
|
|
347
347
|
const binding = require('@lancedb/lancedb-linux-arm64-musl');
|
|
348
348
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-musl/package.json').version;
|
|
349
|
-
if (bindingPackageVersion !== '0.41.0
|
|
350
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
349
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
350
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
351
351
|
}
|
|
352
352
|
return binding;
|
|
353
353
|
}
|
|
@@ -365,8 +365,8 @@ function requireNative() {
|
|
|
365
365
|
try {
|
|
366
366
|
const binding = require('@lancedb/lancedb-linux-arm64-gnu');
|
|
367
367
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm64-gnu/package.json').version;
|
|
368
|
-
if (bindingPackageVersion !== '0.41.0
|
|
369
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
368
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
369
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
370
370
|
}
|
|
371
371
|
return binding;
|
|
372
372
|
}
|
|
@@ -386,8 +386,8 @@ function requireNative() {
|
|
|
386
386
|
try {
|
|
387
387
|
const binding = require('@lancedb/lancedb-linux-arm-musleabihf');
|
|
388
388
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-musleabihf/package.json').version;
|
|
389
|
-
if (bindingPackageVersion !== '0.41.0
|
|
390
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
389
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
390
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
391
391
|
}
|
|
392
392
|
return binding;
|
|
393
393
|
}
|
|
@@ -405,8 +405,8 @@ function requireNative() {
|
|
|
405
405
|
try {
|
|
406
406
|
const binding = require('@lancedb/lancedb-linux-arm-gnueabihf');
|
|
407
407
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-arm-gnueabihf/package.json').version;
|
|
408
|
-
if (bindingPackageVersion !== '0.41.0
|
|
409
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
408
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
409
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
410
410
|
}
|
|
411
411
|
return binding;
|
|
412
412
|
}
|
|
@@ -426,8 +426,8 @@ function requireNative() {
|
|
|
426
426
|
try {
|
|
427
427
|
const binding = require('@lancedb/lancedb-linux-loong64-musl');
|
|
428
428
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-musl/package.json').version;
|
|
429
|
-
if (bindingPackageVersion !== '0.41.0
|
|
430
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
429
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
430
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
431
431
|
}
|
|
432
432
|
return binding;
|
|
433
433
|
}
|
|
@@ -445,8 +445,8 @@ function requireNative() {
|
|
|
445
445
|
try {
|
|
446
446
|
const binding = require('@lancedb/lancedb-linux-loong64-gnu');
|
|
447
447
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-loong64-gnu/package.json').version;
|
|
448
|
-
if (bindingPackageVersion !== '0.41.0
|
|
449
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
448
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
449
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
450
450
|
}
|
|
451
451
|
return binding;
|
|
452
452
|
}
|
|
@@ -466,8 +466,8 @@ function requireNative() {
|
|
|
466
466
|
try {
|
|
467
467
|
const binding = require('@lancedb/lancedb-linux-riscv64-musl');
|
|
468
468
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-musl/package.json').version;
|
|
469
|
-
if (bindingPackageVersion !== '0.41.0
|
|
470
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
469
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
470
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
471
471
|
}
|
|
472
472
|
return binding;
|
|
473
473
|
}
|
|
@@ -485,8 +485,8 @@ function requireNative() {
|
|
|
485
485
|
try {
|
|
486
486
|
const binding = require('@lancedb/lancedb-linux-riscv64-gnu');
|
|
487
487
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-riscv64-gnu/package.json').version;
|
|
488
|
-
if (bindingPackageVersion !== '0.41.0
|
|
489
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
488
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
489
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
490
490
|
}
|
|
491
491
|
return binding;
|
|
492
492
|
}
|
|
@@ -505,8 +505,8 @@ function requireNative() {
|
|
|
505
505
|
try {
|
|
506
506
|
const binding = require('@lancedb/lancedb-linux-ppc64-gnu');
|
|
507
507
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-ppc64-gnu/package.json').version;
|
|
508
|
-
if (bindingPackageVersion !== '0.41.0
|
|
509
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
508
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
509
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
510
510
|
}
|
|
511
511
|
return binding;
|
|
512
512
|
}
|
|
@@ -524,8 +524,8 @@ function requireNative() {
|
|
|
524
524
|
try {
|
|
525
525
|
const binding = require('@lancedb/lancedb-linux-s390x-gnu');
|
|
526
526
|
const bindingPackageVersion = require('@lancedb/lancedb-linux-s390x-gnu/package.json').version;
|
|
527
|
-
if (bindingPackageVersion !== '0.41.0
|
|
528
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
527
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
528
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
529
529
|
}
|
|
530
530
|
return binding;
|
|
531
531
|
}
|
|
@@ -548,8 +548,8 @@ function requireNative() {
|
|
|
548
548
|
try {
|
|
549
549
|
const binding = require('@lancedb/lancedb-openharmony-arm64');
|
|
550
550
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm64/package.json').version;
|
|
551
|
-
if (bindingPackageVersion !== '0.41.0
|
|
552
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
551
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
552
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
553
553
|
}
|
|
554
554
|
return binding;
|
|
555
555
|
}
|
|
@@ -567,8 +567,8 @@ function requireNative() {
|
|
|
567
567
|
try {
|
|
568
568
|
const binding = require('@lancedb/lancedb-openharmony-x64');
|
|
569
569
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-x64/package.json').version;
|
|
570
|
-
if (bindingPackageVersion !== '0.41.0
|
|
571
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
570
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
571
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
572
572
|
}
|
|
573
573
|
return binding;
|
|
574
574
|
}
|
|
@@ -586,8 +586,8 @@ function requireNative() {
|
|
|
586
586
|
try {
|
|
587
587
|
const binding = require('@lancedb/lancedb-openharmony-arm');
|
|
588
588
|
const bindingPackageVersion = require('@lancedb/lancedb-openharmony-arm/package.json').version;
|
|
589
|
-
if (bindingPackageVersion !== '0.41.0
|
|
590
|
-
throw new Error(`Native binding package version mismatch, expected 0.41.0
|
|
589
|
+
if (bindingPackageVersion !== '0.41.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
590
|
+
throw new Error(`Native binding package version mismatch, expected 0.41.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
591
591
|
}
|
|
592
592
|
return binding;
|
|
593
593
|
}
|
|
@@ -687,6 +687,7 @@ module.exports.TagContents = nativeBinding.TagContents;
|
|
|
687
687
|
module.exports.Tags = nativeBinding.Tags;
|
|
688
688
|
module.exports.TakeQuery = nativeBinding.TakeQuery;
|
|
689
689
|
module.exports.VectorQuery = nativeBinding.VectorQuery;
|
|
690
|
+
module.exports.experimentalFunctionsEnabled = nativeBinding.experimentalFunctionsEnabled;
|
|
690
691
|
module.exports.lancedbMetricsCatalog = nativeBinding.lancedbMetricsCatalog;
|
|
691
692
|
module.exports.permutationBuilder = nativeBinding.permutationBuilder;
|
|
692
693
|
module.exports.registerLancedbMetricsRecorder = nativeBinding.registerLancedbMetricsRecorder;
|
package/dist/query.d.ts
CHANGED
|
@@ -38,12 +38,14 @@ export interface QueryExecutionOptions {
|
|
|
38
38
|
*
|
|
39
39
|
* - `"descriptions"` (default): each blob is a descriptor. Read the bytes
|
|
40
40
|
* with {@link Table.fetchBlobs} or {@link Table.fetchBlobFiles}.
|
|
41
|
-
* - `"bytes"`: each
|
|
42
|
-
* `LargeBinary`. The query also reads `_rowid` to fetch
|
|
41
|
+
* - `"bytes"`: each blob column, including blobs nested in structs, holds
|
|
42
|
+
* the bytes as `LargeBinary`. The query also reads `_rowid` to fetch them, and
|
|
43
43
|
* leaves it out of the result unless {@link QueryBase.withRowId} was
|
|
44
44
|
* called. All the bytes are held in memory.
|
|
45
45
|
*
|
|
46
|
-
*
|
|
46
|
+
* Selecting a parent struct or directly aliasing a blob or struct also returns
|
|
47
|
+
* bytes. Blobs inside lists keep their descriptors. Arbitrary projection
|
|
48
|
+
* expressions are not materialized as bytes.
|
|
47
49
|
*
|
|
48
50
|
* The rows and the bytes come from the same table version. If the table
|
|
49
51
|
* changes while the query runs, the query runs again, up to three times.
|
|
@@ -281,25 +283,25 @@ export declare class StandardQueryBase<NativeQueryType extends NativeQuery | Nat
|
|
|
281
283
|
*/
|
|
282
284
|
fastSearch(): this;
|
|
283
285
|
/**
|
|
284
|
-
* Control
|
|
286
|
+
* Control RTE read routing for this query.
|
|
285
287
|
*
|
|
286
|
-
* By default (unset), when the table carries
|
|
287
|
-
* {@link Table#
|
|
288
|
+
* By default (unset), when the table carries an RTE write spec (see
|
|
289
|
+
* {@link Table#enableRTE}), reads are routed through the LSM scanner so
|
|
288
290
|
* they also return data written via the `mergeInsert` LSM path that has not yet
|
|
289
291
|
* been compacted into the base table (the active/frozen in-memory memtables and
|
|
290
292
|
* the SSTables), deduplicated by primary key; a table without a spec
|
|
291
293
|
* reads the base table.
|
|
292
294
|
*
|
|
293
295
|
* @param enable - `true` forces the LSM scanner and errors if the table has no
|
|
294
|
-
*
|
|
296
|
+
* RTE write spec. `false` bypasses the RTE and reads the base table only,
|
|
295
297
|
* even when a spec is present.
|
|
296
298
|
*
|
|
297
299
|
* Note: the LSM scanner does not support every query shape (e.g. reranking,
|
|
298
|
-
* hybrid search, `orderBy`). On
|
|
299
|
-
* `
|
|
300
|
-
* un-compacted
|
|
300
|
+
* hybrid search, `orderBy`). On an RTE table those shapes error unless
|
|
301
|
+
* `useRTE(false)` is set, because a base-only read would silently exclude
|
|
302
|
+
* un-compacted RTE data.
|
|
301
303
|
*/
|
|
302
|
-
|
|
304
|
+
useRTE(enable: boolean): this;
|
|
303
305
|
}
|
|
304
306
|
/**
|
|
305
307
|
* An interface for a query that can be executed
|
|
@@ -362,7 +364,7 @@ export declare class VectorQuery extends StandardQueryBase<NativeVectorQuery> {
|
|
|
362
364
|
* probing may continue when too few candidates are found.
|
|
363
365
|
* Any explicit effort, including 0.5, overrides nprobes in either call order.
|
|
364
366
|
* Explicit minimum and maximum bounds still apply. This is not a recall
|
|
365
|
-
* guarantee and does not change refinement or HNSW ef. The
|
|
367
|
+
* guarantee and does not change refinement or HNSW ef. The RTE LSM
|
|
366
368
|
* scanner does not yet support this option.
|
|
367
369
|
*
|
|
368
370
|
* @example
|
|
@@ -505,15 +507,15 @@ export declare function createAutoQuery(table: NativeTable, query: string, colum
|
|
|
505
507
|
export declare class TakeQuery extends QueryBase<NativeTakeQuery> {
|
|
506
508
|
constructor(inner: NativeTakeQuery, blobContext?: QueryBlobContext);
|
|
507
509
|
/**
|
|
508
|
-
* Control
|
|
510
|
+
* Control RTE read routing for this take query.
|
|
509
511
|
*
|
|
510
|
-
* `false` bypasses the
|
|
512
|
+
* `false` bypasses the RTE and reads the base table only — the escape hatch,
|
|
511
513
|
* since take-by-row-id/offset is not supported on the LSM scanner and, on a
|
|
512
|
-
*
|
|
514
|
+
* RTE table, auto-routes to it and errors otherwise.
|
|
513
515
|
*
|
|
514
516
|
* @param enable - `false` reads the base table only.
|
|
515
517
|
*/
|
|
516
|
-
|
|
518
|
+
useRTE(enable: boolean): this;
|
|
517
519
|
}
|
|
518
520
|
/**
|
|
519
521
|
* A builder for automatic string searches.
|
package/dist/query.js
CHANGED
|
@@ -23,10 +23,25 @@ async function* RecordBatchIterator(promisedInner) {
|
|
|
23
23
|
}
|
|
24
24
|
const BLOB_BYTES_ATTEMPTS = 3;
|
|
25
25
|
function blobSources(blobColumns, projection) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
if (projection === undefined) {
|
|
27
|
+
return blobColumns.map((source) => {
|
|
28
|
+
const [output, ...path] = source.split(".");
|
|
29
|
+
return { output, path, source };
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const sources = [];
|
|
33
|
+
for (const [output, source] of projection) {
|
|
34
|
+
for (const column of blobColumns) {
|
|
35
|
+
if (column === source || column.startsWith(`${source}.`)) {
|
|
36
|
+
sources.push({
|
|
37
|
+
output,
|
|
38
|
+
path: column === source ? [] : column.slice(source.length + 1).split("."),
|
|
39
|
+
source: column,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return sources;
|
|
30
45
|
}
|
|
31
46
|
async function readBlobBytes(table, sources, snapshot, dropRowId) {
|
|
32
47
|
const rowIdColumn = table.getChild("_rowid");
|
|
@@ -36,14 +51,21 @@ async function readBlobBytes(table, sources, snapshot, dropRowId) {
|
|
|
36
51
|
const rowIds = rowIdColumn === null
|
|
37
52
|
? []
|
|
38
53
|
: Array.from(rowIdColumn.toArray());
|
|
54
|
+
const outputFields = new Map(table.schema.fields.map((field) => [field.name, field]));
|
|
39
55
|
const replacements = new Map();
|
|
40
|
-
for (const
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
for (const { output, path, source } of sources) {
|
|
57
|
+
let field = outputFields.get(output);
|
|
58
|
+
for (const name of path) {
|
|
59
|
+
field =
|
|
60
|
+
field !== undefined && arrow_1.DataType.isStruct(field.type)
|
|
61
|
+
? field.type.children.find((child) => child.name === name)
|
|
62
|
+
: undefined;
|
|
63
|
+
}
|
|
64
|
+
if (field === undefined) {
|
|
43
65
|
continue;
|
|
44
66
|
}
|
|
45
67
|
const values = rowIds.length === 0 ? [] : await snapshot.fetchBlobs(source, rowIds);
|
|
46
|
-
replacements.set(
|
|
68
|
+
replacements.set(field, values.map((value) => value ?? null));
|
|
47
69
|
}
|
|
48
70
|
const result = withBinaryColumns(table, replacements);
|
|
49
71
|
if (!dropRowId) {
|
|
@@ -53,27 +75,42 @@ async function readBlobBytes(table, sources, snapshot, dropRowId) {
|
|
|
53
75
|
.map((field) => field.name)
|
|
54
76
|
.filter((name) => name !== "_rowid"));
|
|
55
77
|
}
|
|
56
|
-
// A fresh field, not a clone: the descriptor field's metadata must not follow
|
|
57
|
-
// the bytes.
|
|
58
78
|
function withBinaryColumns(table, replacements) {
|
|
59
79
|
if (replacements.size === 0) {
|
|
60
80
|
return table;
|
|
61
81
|
}
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
82
|
+
const replaceField = (field) => {
|
|
83
|
+
if (replacements.has(field)) {
|
|
84
|
+
// The descriptor's extension and encoding metadata must not follow bytes.
|
|
85
|
+
return new arrow_1.Field(field.name, new arrow_1.LargeBinary(), true);
|
|
86
|
+
}
|
|
87
|
+
if (arrow_1.DataType.isStruct(field.type)) {
|
|
88
|
+
const children = field.type.children.map(replaceField);
|
|
89
|
+
if (children.some((child, i) => child !== field.type.children[i])) {
|
|
90
|
+
return field.clone({ type: new arrow_1.Struct(children) });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return field;
|
|
94
|
+
};
|
|
95
|
+
const fields = table.schema.fields.map(replaceField);
|
|
65
96
|
const schema = new arrow_1.Schema(fields, table.schema.metadata);
|
|
66
97
|
let offset = 0;
|
|
67
98
|
const batches = table.batches.map((batch) => {
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return child;
|
|
99
|
+
const replaceData = (data, field, updated) => {
|
|
100
|
+
if (field === updated) {
|
|
101
|
+
return data;
|
|
72
102
|
}
|
|
73
|
-
|
|
74
|
-
|
|
103
|
+
const values = replacements.get(field);
|
|
104
|
+
if (values !== undefined) {
|
|
105
|
+
return (0, arrow_1.vectorFromArray)(values.slice(offset, offset + batch.numRows), new arrow_1.LargeBinary()).data[0];
|
|
106
|
+
}
|
|
107
|
+
const children = data.children.map((child, index) => replaceData(child, field.type.children[index], updated.type.children[index]));
|
|
108
|
+
// Keep the struct's validity bitmap and offset, including null parents.
|
|
109
|
+
return data.clone(updated.type, undefined, undefined, undefined, undefined, children);
|
|
110
|
+
};
|
|
111
|
+
const children = batch.data.children.map((child, index) => replaceData(child, table.schema.fields[index], fields[index]));
|
|
75
112
|
offset += batch.numRows;
|
|
76
|
-
return new arrow_1.RecordBatch(schema,
|
|
113
|
+
return new arrow_1.RecordBatch(schema, batch.data.clone(new arrow_1.Struct(fields), undefined, undefined, undefined, undefined, children));
|
|
77
114
|
});
|
|
78
115
|
return new arrow_1.Table(schema, batches);
|
|
79
116
|
}
|
|
@@ -259,7 +296,7 @@ class QueryBase {
|
|
|
259
296
|
const snapshot = await context.table.querySnapshot();
|
|
260
297
|
const version = await snapshot.version();
|
|
261
298
|
const sources = blobSources(await snapshot.blobColumns(), context.projection);
|
|
262
|
-
if (sources.
|
|
299
|
+
if (sources.length === 0) {
|
|
263
300
|
return this.collect(options, false);
|
|
264
301
|
}
|
|
265
302
|
const addRowId = !context.withRowId;
|
|
@@ -469,26 +506,26 @@ class StandardQueryBase extends QueryBase {
|
|
|
469
506
|
return this;
|
|
470
507
|
}
|
|
471
508
|
/**
|
|
472
|
-
* Control
|
|
509
|
+
* Control RTE read routing for this query.
|
|
473
510
|
*
|
|
474
|
-
* By default (unset), when the table carries
|
|
475
|
-
* {@link Table#
|
|
511
|
+
* By default (unset), when the table carries an RTE write spec (see
|
|
512
|
+
* {@link Table#enableRTE}), reads are routed through the LSM scanner so
|
|
476
513
|
* they also return data written via the `mergeInsert` LSM path that has not yet
|
|
477
514
|
* been compacted into the base table (the active/frozen in-memory memtables and
|
|
478
515
|
* the SSTables), deduplicated by primary key; a table without a spec
|
|
479
516
|
* reads the base table.
|
|
480
517
|
*
|
|
481
518
|
* @param enable - `true` forces the LSM scanner and errors if the table has no
|
|
482
|
-
*
|
|
519
|
+
* RTE write spec. `false` bypasses the RTE and reads the base table only,
|
|
483
520
|
* even when a spec is present.
|
|
484
521
|
*
|
|
485
522
|
* Note: the LSM scanner does not support every query shape (e.g. reranking,
|
|
486
|
-
* hybrid search, `orderBy`). On
|
|
487
|
-
* `
|
|
488
|
-
* un-compacted
|
|
523
|
+
* hybrid search, `orderBy`). On an RTE table those shapes error unless
|
|
524
|
+
* `useRTE(false)` is set, because a base-only read would silently exclude
|
|
525
|
+
* un-compacted RTE data.
|
|
489
526
|
*/
|
|
490
|
-
|
|
491
|
-
this.doCall((inner) => inner.
|
|
527
|
+
useRTE(enable) {
|
|
528
|
+
this.doCall((inner) => inner.useRTE(enable));
|
|
492
529
|
return this;
|
|
493
530
|
}
|
|
494
531
|
}
|
|
@@ -554,7 +591,7 @@ class VectorQuery extends StandardQueryBase {
|
|
|
554
591
|
* probing may continue when too few candidates are found.
|
|
555
592
|
* Any explicit effort, including 0.5, overrides nprobes in either call order.
|
|
556
593
|
* Explicit minimum and maximum bounds still apply. This is not a recall
|
|
557
|
-
* guarantee and does not change refinement or HNSW ef. The
|
|
594
|
+
* guarantee and does not change refinement or HNSW ef. The RTE LSM
|
|
558
595
|
* scanner does not yet support this option.
|
|
559
596
|
*
|
|
560
597
|
* @example
|
|
@@ -816,16 +853,16 @@ class TakeQuery extends QueryBase {
|
|
|
816
853
|
super(inner, blobContext);
|
|
817
854
|
}
|
|
818
855
|
/**
|
|
819
|
-
* Control
|
|
856
|
+
* Control RTE read routing for this take query.
|
|
820
857
|
*
|
|
821
|
-
* `false` bypasses the
|
|
858
|
+
* `false` bypasses the RTE and reads the base table only — the escape hatch,
|
|
822
859
|
* since take-by-row-id/offset is not supported on the LSM scanner and, on a
|
|
823
|
-
*
|
|
860
|
+
* RTE table, auto-routes to it and errors otherwise.
|
|
824
861
|
*
|
|
825
862
|
* @param enable - `false` reads the base table only.
|
|
826
863
|
*/
|
|
827
|
-
|
|
828
|
-
this.doCall((inner) => inner.
|
|
864
|
+
useRTE(enable) {
|
|
865
|
+
this.doCall((inner) => inner.useRTE(enable));
|
|
829
866
|
return this;
|
|
830
867
|
}
|
|
831
868
|
}
|