Compare commits

...

8 Commits

Author SHA1 Message Date
Lance Release
e1836e54e3 Bump version: 0.20.0 → 0.21.0-beta.0 2025-02-26 20:10:54 +00:00
Weston Pace
4ba5326880 feat: reapply upgrade lance to v0.23.3-beta.1 (#2157)
This reverts commit 2f0c5baea2.

---------

Co-authored-by: Lu Qiu <luqiujob@gmail.com>
2025-02-26 11:44:11 -08:00
Lance Release
b036a69300 Updating package-lock.json 2025-02-26 19:32:22 +00:00
Will Jones
5b12a47119 feat!: revert query limit to be unbounded for scans (#2151)
In earlier PRs (#1886, #1191) we made the default limit 10 regardless of
the query type. This was confusing for users and in many cases a
breaking change. Users would have queries that used to return all
results, but instead only returned the first 10, causing silent bugs.

Part of the cause was consistency: the Python sync API seems to have
always had a limit of 10, while newer APIs (Python async and Nodejs)
didn't.

This PR sets the default limit only for searches (vector search, FTS),
while letting scans (even with filters) be unbounded. It does this
consistently for all SDKs.

Fixes #1983
Fixes #1852
Fixes #2141
2025-02-26 10:32:14 -08:00
Lance Release
769d483e50 Updating package-lock.json 2025-02-26 18:16:59 +00:00
Lance Release
9ecb11fe5a Updating package-lock.json 2025-02-26 18:16:42 +00:00
Lance Release
22bd8329f3 Bump version: 0.17.0-beta.0 → 0.17.0 2025-02-26 18:16:07 +00:00
Lance Release
a736fad149 Bump version: 0.16.1-beta.3 → 0.17.0-beta.0 2025-02-26 18:16:01 +00:00
29 changed files with 252 additions and 199 deletions

View File

@@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "0.16.1-beta.3"
current_version = "0.17.0"
parse = """(?x)
(?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\.

216
Cargo.lock generated
View File

@@ -128,9 +128,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.95"
version = "1.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04"
checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4"
[[package]]
name = "arbitrary"
@@ -520,9 +520,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "aws-config"
version = "1.5.16"
version = "1.5.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50236e4d60fe8458de90a71c0922c761e41755adf091b1b03de1cef537179915"
checksum = "490aa7465ee685b2ced076bb87ef654a47724a7844e2c7d3af4e749ce5b875dd"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -588,9 +588,9 @@ dependencies = [
[[package]]
name = "aws-sdk-bedrockruntime"
version = "1.74.0"
version = "1.75.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6938541d1948a543bca23303fec4cff9c36bf0e63b8fa3ae1b337bcb9d5b81af"
checksum = "2ddf7475b6f50a1a5be8edb1bcdf6e4ae00feed5b890d14a3f1f0e14d76f5a16"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -612,9 +612,9 @@ dependencies = [
[[package]]
name = "aws-sdk-dynamodb"
version = "1.65.0"
version = "1.66.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "873144cfb097fc75555f2b2728fa4d5f705a17a4613a0f017baff2f7cfea2b09"
checksum = "5296daf754d333f51798bff599876c3849394ec3dabe8d1d61cbacb961fdde37"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -635,9 +635,9 @@ dependencies = [
[[package]]
name = "aws-sdk-kms"
version = "1.60.0"
version = "1.61.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adc36035f7393a24719069c9a2f52e20972f7ee8472bd788e863968736acc449"
checksum = "72054067b7b84e963ee29c3b7fdfc61f76bcfc697e38b8dc1095a3ad2e7e764a"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -657,9 +657,9 @@ dependencies = [
[[package]]
name = "aws-sdk-s3"
version = "1.76.0"
version = "1.77.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66e83401ad7287ad15244d557e35502c2a94105ca5b41d656c391f1a4fc04ca2"
checksum = "34e87342432a3de0e94e82c99a7cbd9042f99de029ae1f4e368160f9e9929264"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -691,9 +691,9 @@ dependencies = [
[[package]]
name = "aws-sdk-sso"
version = "1.59.0"
version = "1.60.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "00a35fc7e74f5be45839eb753568535c074a592185dd0a2d406685018d581c43"
checksum = "60186fab60b24376d3e33b9ff0a43485f99efd470e3b75a9160c849741d63d56"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -713,9 +713,9 @@ dependencies = [
[[package]]
name = "aws-sdk-ssooidc"
version = "1.60.0"
version = "1.61.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8fa655b4f313124ce272cbc38c5fef13793c832279cec750103e5e6b71a54b8"
checksum = "7033130ce1ee13e6018905b7b976c915963755aef299c1521897679d6cd4f8ef"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -735,9 +735,9 @@ dependencies = [
[[package]]
name = "aws-sdk-sts"
version = "1.60.0"
version = "1.61.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc1cfe5e16b90421ea031f4c6348b534ef442e76f6bf4a1b2b592c12cc2c6af9"
checksum = "c5c1cac7677179d622b4448b0d31bcb359185295dc6fca891920cfb17e2b5156"
dependencies = [
"aws-credential-types",
"aws-runtime",
@@ -798,9 +798,9 @@ dependencies = [
[[package]]
name = "aws-smithy-checksums"
version = "0.62.0"
version = "0.63.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2f45a1c384d7a393026bc5f5c177105aa9fa68e4749653b985707ac27d77295"
checksum = "db2dc8d842d872529355c72632de49ef8c5a2949a4472f10e802f28cf925770c"
dependencies = [
"aws-smithy-http",
"aws-smithy-types",
@@ -1153,9 +1153,9 @@ checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf"
[[package]]
name = "bytemuck"
version = "1.18.0"
version = "1.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae"
checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3"
dependencies = [
"bytemuck_derive",
]
@@ -1250,9 +1250,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.2.14"
version = "1.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c3d1b2e905a3a7b00a6141adb0e4c0bb941d11caf55349d863942a1cc44e3c9"
checksum = "c736e259eea577f443d5c86c304f9f4ae0295c43f3ba05c21f1d66b5f06001af"
dependencies = [
"jobserver",
"libc",
@@ -2279,9 +2279,9 @@ dependencies = [
[[package]]
name = "either"
version = "1.13.0"
version = "1.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
checksum = "b7914353092ddf589ad78f25c5c1c21b7f80b0ff8621e7c814c3485b5306da9d"
[[package]]
name = "elliptic-curve"
@@ -2508,9 +2508,9 @@ dependencies = [
[[package]]
name = "flate2"
version = "1.0.35"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c"
checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc"
dependencies = [
"crc32fast",
"miniz_oxide",
@@ -2570,9 +2570,8 @@ dependencies = [
[[package]]
name = "fsst"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e28269e6ea9eb533c4bb3b778bd42d08eb1b8334e5db1f814e2efddd8e5d2f5d"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"rand",
]
@@ -3533,9 +3532,8 @@ dependencies = [
[[package]]
name = "lance"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e7be6540ede5f1d674d0f2296fd405c9b2a2b795cef695e3d2f7d24dd3b6a3e"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"arrow",
"arrow-arith",
@@ -3594,9 +3592,8 @@ dependencies = [
[[package]]
name = "lance-arrow"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2d7c00c4e14167f620f978a7aa4709c327631df8f9393a23f95853b54e6f4a9"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -3613,9 +3610,8 @@ dependencies = [
[[package]]
name = "lance-core"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0487aa02dae70e714a52449eef151bf26e98a6a82f1338426600bb83b465d04"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"arrow-array",
"arrow-buffer",
@@ -3651,9 +3647,8 @@ dependencies = [
[[package]]
name = "lance-datafusion"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7db41af86a8bb5e7095448607fed27b74487ad4df3c78423eff9520ae1d8de34"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"arrow",
"arrow-array",
@@ -3678,9 +3673,8 @@ dependencies = [
[[package]]
name = "lance-encoding"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89f03078c7b90112325db27b765a845599c272f35d30fe577abbcec0518e80a4"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"arrayref",
"arrow",
@@ -3718,9 +3712,8 @@ dependencies = [
[[package]]
name = "lance-file"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0188b5372369f4c2c747437a9774899eb087ca3f0ad063b9a320d4226cde203a"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"arrow-arith",
"arrow-array",
@@ -3754,9 +3747,8 @@ dependencies = [
[[package]]
name = "lance-index"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a9a36cbd95a8badf5b09d3849d17e8348e51a5c8560189ed233b8e85ba5d057"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"arrow",
"arrow-array",
@@ -3808,9 +3800,8 @@ dependencies = [
[[package]]
name = "lance-io"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bf35efc665fcaf84d9d25f62e3e7e5dd131620d8adf977ab157ab27803dbf4e5"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"arrow",
"arrow-arith",
@@ -3848,9 +3839,8 @@ dependencies = [
[[package]]
name = "lance-linalg"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa90bc0c78b4308e4ddf89fcbc609c44e8e8de629a965ea56a4af6cf73f8d315"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"arrow-array",
"arrow-ord",
@@ -3873,9 +3863,8 @@ dependencies = [
[[package]]
name = "lance-table"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "254bc42c13bb44a3b3b9d4f6f3d614729fc8bf1a29a49b9ca62c5f36e01d66de"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"arrow",
"arrow-array",
@@ -3914,9 +3903,8 @@ dependencies = [
[[package]]
name = "lance-testing"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6049d000593c6cebf2dbc58f5e99cbd1af7eafb9b7ecc1451d8e63323bd869e"
version = "0.23.3"
source = "git+https://github.com/lancedb/lance.git?tag=v0.23.3-beta.1#f69480e34dc1be6f1689cc8c36d43f6d8866c678"
dependencies = [
"arrow-array",
"arrow-schema",
@@ -3927,7 +3915,7 @@ dependencies = [
[[package]]
name = "lancedb"
version = "0.16.1-beta.3"
version = "0.17.0"
dependencies = [
"arrow",
"arrow-array",
@@ -4011,7 +3999,7 @@ dependencies = [
[[package]]
name = "lancedb-node"
version = "0.16.1-beta.3"
version = "0.17.0"
dependencies = [
"arrow-array",
"arrow-ipc",
@@ -4036,7 +4024,7 @@ dependencies = [
[[package]]
name = "lancedb-nodejs"
version = "0.16.1-beta.3"
version = "0.17.0"
dependencies = [
"arrow-array",
"arrow-ipc",
@@ -4054,7 +4042,7 @@ dependencies = [
[[package]]
name = "lancedb-python"
version = "0.19.1-beta.3"
version = "0.20.0"
dependencies = [
"arrow",
"env_logger",
@@ -4145,9 +4133,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.169"
version = "0.2.170"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828"
[[package]]
name = "libloading"
@@ -4193,9 +4181,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
[[package]]
name = "litemap"
version = "0.7.4"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856"
[[package]]
name = "lock_api"
@@ -4209,9 +4197,9 @@ dependencies = [
[[package]]
name = "log"
version = "0.4.25"
version = "0.4.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
[[package]]
name = "loom"
@@ -4377,9 +4365,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "miniz_oxide"
version = "0.8.4"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b3b1c9bd4fe1f0f8b387f6eb9eb3b4a1aa26185e5750efb9140301703f62cd1b"
checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5"
dependencies = [
"adler2",
]
@@ -4497,9 +4485,9 @@ dependencies = [
[[package]]
name = "napi-build"
version = "2.1.4"
version = "2.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db836caddef23662b94e16bf1f26c40eceb09d6aee5d5b06a7ac199320b69b19"
checksum = "40685973218af4aa4b42486652692c294c44b5a67e4b2202df721c9063f2e51c"
[[package]]
name = "napi-derive"
@@ -4541,9 +4529,9 @@ dependencies = [
[[package]]
name = "native-tls"
version = "0.2.13"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c"
checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e"
dependencies = [
"libc",
"log",
@@ -4802,9 +4790,9 @@ checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
[[package]]
name = "oneshot"
version = "0.1.10"
version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79d72a7c0f743d2ebb0a2ad1d219db75fdc799092ed3a884c9144c42a31225bd"
checksum = "b4ce411919553d3f9fa53a0880544cda985a112117a0444d5ff1e870a893d6ea"
[[package]]
name = "onig"
@@ -5450,9 +5438,9 @@ dependencies = [
[[package]]
name = "portable-atomic"
version = "1.10.0"
version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6"
checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
[[package]]
name = "powerfmt"
@@ -5882,9 +5870,9 @@ dependencies = [
[[package]]
name = "redox_syscall"
version = "0.5.8"
version = "0.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
checksum = "82b568323e98e49e2a0899dcee453dd679fae22d69adf9b11dd508d1549b7e2f"
dependencies = [
"bitflags 2.8.0",
]
@@ -6033,9 +6021,9 @@ dependencies = [
[[package]]
name = "ring"
version = "0.17.9"
version = "0.17.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e75ec5e92c4d8aede845126adc388046234541629e76029599ed35a003c7ed24"
checksum = "da5349ae27d3887ca812fb375b45a4fbb36d8d12d2df394968cd86e35683fe73"
dependencies = [
"cc",
"cfg-if",
@@ -6047,9 +6035,9 @@ dependencies = [
[[package]]
name = "roaring"
version = "0.10.9"
version = "0.10.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41589aba99537475bf697f2118357cad1c31590c5a1b9f6d9fc4ad6d07503661"
checksum = "a652edd001c53df0b3f96a36a8dc93fce6866988efc16808235653c6bcac8bf2"
dependencies = [
"bytemuck",
"byteorder",
@@ -6355,18 +6343,18 @@ checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4"
[[package]]
name = "serde"
version = "1.0.217"
version = "1.0.218"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.217"
version = "1.0.218"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b"
dependencies = [
"proc-macro2",
"quote",
@@ -6375,9 +6363,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.138"
version = "1.0.139"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949"
checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6"
dependencies = [
"itoa",
"memchr",
@@ -6639,9 +6627,9 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
[[package]]
name = "stacker"
version = "0.1.18"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d08feb8f695b465baed819b03c128dc23f57a694510ab1f06c77f763975685e"
checksum = "d9156ebd5870ef293bfb43f91c7a74528d363ec0d424afe24160ed5a4343d08a"
dependencies = [
"cc",
"cfg-if",
@@ -7359,9 +7347,9 @@ checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"
[[package]]
name = "unicode-ident"
version = "1.0.16"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034"
checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe"
[[package]]
name = "unicode-normalization-alignments"
@@ -7473,9 +7461,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "uuid"
version = "1.13.2"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c1f41ffb7cf259f1ecc2876861a17e7142e63ead296f671f81f6ae85903e0d6"
checksum = "bd8dcafa1ca14750d8d7a05aa05988c17aab20886e1f3ae33a40223c58d92ef7"
dependencies = [
"getrandom 0.3.1",
"serde",
@@ -7993,9 +7981,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]]
name = "winnow"
version = "0.7.2"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59690dea168f2198d1a3b0cac23b8063efcd11012f10ae4698f284808c8ef603"
checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1"
dependencies = [
"memchr",
]
@@ -8089,18 +8077,18 @@ dependencies = [
[[package]]
name = "zerofrom"
version = "0.1.5"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e"
checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"
dependencies = [
"zerofrom-derive",
]
[[package]]
name = "zerofrom-derive"
version = "0.1.5"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"
dependencies = [
"proc-macro2",
"quote",
@@ -8153,27 +8141,27 @@ dependencies = [
[[package]]
name = "zstd"
version = "0.13.2"
version = "0.13.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9"
checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
version = "7.2.1"
version = "7.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059"
checksum = "f3051792fbdc2e1e143244dc28c60f73d8470e93f3f9cbd0ead44da5ed802722"
dependencies = [
"zstd-sys",
]
[[package]]
name = "zstd-sys"
version = "2.0.13+zstd.1.5.6"
version = "2.0.14+zstd.1.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa"
checksum = "8fb060d4926e4ac3a3ad15d864e99ceb5f343c6b34f5bd6d81ae6ed417311be5"
dependencies = [
"cc",
"pkg-config",

View File

@@ -21,14 +21,16 @@ categories = ["database-implementations"]
rust-version = "1.78.0"
[workspace.dependencies]
lance = { "version" = "=0.23.2", "features" = ["dynamodb"] }
lance-io = { version = "=0.23.2" }
lance-index = { version = "=0.23.2" }
lance-linalg = { version = "=0.23.2" }
lance-table = { version = "=0.23.2" }
lance-testing = { version = "=0.23.2" }
lance-datafusion = { version = "=0.23.2" }
lance-encoding = { version = "=0.23.2" }
lance = { "version" = "=0.23.3", "features" = [
"dynamodb",
], git = "https://github.com/lancedb/lance.git", tag = "v0.23.3-beta.1" }
lance-io = { version = "=0.23.3", tag = "v0.23.3-beta.1", git = "https://github.com/lancedb/lance.git" }
lance-index = { version = "=0.23.3", tag = "v0.23.3-beta.1", git = "https://github.com/lancedb/lance.git" }
lance-linalg = { version = "=0.23.3", tag = "v0.23.3-beta.1", git = "https://github.com/lancedb/lance.git" }
lance-table = { version = "=0.23.3", tag = "v0.23.3-beta.1", git = "https://github.com/lancedb/lance.git" }
lance-testing = { version = "=0.23.3", tag = "v0.23.3-beta.1", git = "https://github.com/lancedb/lance.git" }
lance-datafusion = { version = "=0.23.3", tag = "v0.23.3-beta.1", git = "https://github.com/lancedb/lance.git" }
lance-encoding = { version = "=0.23.3", tag = "v0.23.3-beta.1", git = "https://github.com/lancedb/lance.git" }
# Note that this one does not include pyarrow
arrow = { version = "53.2", optional = false }
arrow-array = "53.2"

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>com.lancedb</groupId>
<artifactId>lancedb-parent</artifactId>
<version>0.16.1-beta.3</version>
<version>0.17.0-final.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

View File

@@ -6,7 +6,7 @@
<groupId>com.lancedb</groupId>
<artifactId>lancedb-parent</artifactId>
<version>0.16.1-beta.3</version>
<version>0.17.0-final.0</version>
<packaging>pom</packaging>
<name>LanceDB Parent</name>

68
node/package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "vectordb",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "vectordb",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"cpu": [
"x64",
"arm64"
@@ -52,14 +52,14 @@
"uuid": "^9.0.0"
},
"optionalDependencies": {
"@lancedb/vectordb-darwin-arm64": "0.16.1-beta.3",
"@lancedb/vectordb-darwin-x64": "0.16.1-beta.3",
"@lancedb/vectordb-linux-arm64-gnu": "0.16.1-beta.3",
"@lancedb/vectordb-linux-arm64-musl": "0.16.1-beta.3",
"@lancedb/vectordb-linux-x64-gnu": "0.16.1-beta.3",
"@lancedb/vectordb-linux-x64-musl": "0.16.1-beta.3",
"@lancedb/vectordb-win32-arm64-msvc": "0.16.1-beta.3",
"@lancedb/vectordb-win32-x64-msvc": "0.16.1-beta.3"
"@lancedb/vectordb-darwin-arm64": "0.17.0",
"@lancedb/vectordb-darwin-x64": "0.17.0",
"@lancedb/vectordb-linux-arm64-gnu": "0.17.0",
"@lancedb/vectordb-linux-arm64-musl": "0.17.0",
"@lancedb/vectordb-linux-x64-gnu": "0.17.0",
"@lancedb/vectordb-linux-x64-musl": "0.17.0",
"@lancedb/vectordb-win32-arm64-msvc": "0.17.0",
"@lancedb/vectordb-win32-x64-msvc": "0.17.0"
},
"peerDependencies": {
"@apache-arrow/ts": "^14.0.2",
@@ -330,9 +330,9 @@
}
},
"node_modules/@lancedb/vectordb-darwin-arm64": {
"version": "0.16.1-beta.3",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.16.1-beta.3.tgz",
"integrity": "sha512-k2dfDNvoFjZuF8RCkFX9yFkLIg292mFg+o6IUeXndlikhABi8F+NbRODGUxJf3QUioks2tGF831KFoV5oQyeEA==",
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.17.0.tgz",
"integrity": "sha512-QlTuaCGaqHLlMrDTqcMFTg2Y07pAQjBy10oIKqDv7qUk5Lo7OoPeTsBUJrTjOnxy+SqlU7UE1ZmuQBRSsScFvQ==",
"cpu": [
"arm64"
],
@@ -343,9 +343,9 @@
]
},
"node_modules/@lancedb/vectordb-darwin-x64": {
"version": "0.16.1-beta.3",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-x64/-/vectordb-darwin-x64-0.16.1-beta.3.tgz",
"integrity": "sha512-pYvwcAXBB3MXxa2kvK8PxMoEsaE+EFld5pky6dDo6qJQVepUz9pi/e1FTLxW6m0mgwtRj52P6xe55sj1Yln9Qw==",
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-darwin-x64/-/vectordb-darwin-x64-0.17.0.tgz",
"integrity": "sha512-iAtZNgU9Rf+pmcNRW878uAw47+rLRRUip1Po+WKwdC/9pYpK+GEMqTjwftFhdGn5NAw4WWPWOzvBC3AGnmk0dA==",
"cpu": [
"x64"
],
@@ -356,9 +356,9 @@
]
},
"node_modules/@lancedb/vectordb-linux-arm64-gnu": {
"version": "0.16.1-beta.3",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-arm64-gnu/-/vectordb-linux-arm64-gnu-0.16.1-beta.3.tgz",
"integrity": "sha512-BS4rnBtKGJlEdbYgOe85mGhviQaSfEXl8qw0fh0ml8E0qbi5RuLtwfTFMe3yAKSOnNAvaJISqXQyUN7hzkYkUQ==",
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-arm64-gnu/-/vectordb-linux-arm64-gnu-0.17.0.tgz",
"integrity": "sha512-F0el7nOhH9LNnbGpS3jR81Ge8BxLuSe5WGcQaneDIS3EAdEbVlMnNMFvcRye2OCIlWAMjXoXn+m0b5R736TaZA==",
"cpu": [
"arm64"
],
@@ -369,9 +369,9 @@
]
},
"node_modules/@lancedb/vectordb-linux-arm64-musl": {
"version": "0.16.1-beta.3",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-arm64-musl/-/vectordb-linux-arm64-musl-0.16.1-beta.3.tgz",
"integrity": "sha512-/F1mzpgSipfXjeaXJx5c0zLPOipPKnSPIpYviSdLU2Ahm1aHLweW1UsoiUoRkBkvEcVrZfHxL64vasey2I0P7Q==",
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-arm64-musl/-/vectordb-linux-arm64-musl-0.17.0.tgz",
"integrity": "sha512-V1aCbIjvDIhVRzErpgMHZ0vLphHFHZFmxBD3tCfor9+ymTbgp6X5CWkocsRNKAXFZdfXGAXXkxdERvdcVCYAhw==",
"cpu": [
"arm64"
],
@@ -382,9 +382,9 @@
]
},
"node_modules/@lancedb/vectordb-linux-x64-gnu": {
"version": "0.16.1-beta.3",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-gnu/-/vectordb-linux-x64-gnu-0.16.1-beta.3.tgz",
"integrity": "sha512-zGn2Oby8GAQYG7+dqFVi2DDzli2/GAAY7lwPoYbPlyVytcdTlXRsxea1XiT1jzZmyKIlrxA/XXSRsmRq4n1j1w==",
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-gnu/-/vectordb-linux-x64-gnu-0.17.0.tgz",
"integrity": "sha512-t+3SiocM0RKUH9iwiJ2fXxk8dsWZai0ZmgbmbCpKGoyFcj8/9M36ecBO8SZlc65JmLXEnDcy8U8vwVnwJrWLvg==",
"cpu": [
"x64"
],
@@ -395,9 +395,9 @@
]
},
"node_modules/@lancedb/vectordb-linux-x64-musl": {
"version": "0.16.1-beta.3",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-musl/-/vectordb-linux-x64-musl-0.16.1-beta.3.tgz",
"integrity": "sha512-MXYvI7dL+0QtWGDuliUUaEp/XQN+hSndtDc8wlAMyI0lOzmTvC7/C3OZQcMKf6JISZuNS71OVzVTYDYSab9aXw==",
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-musl/-/vectordb-linux-x64-musl-0.17.0.tgz",
"integrity": "sha512-beSMUj2n45XNeR7Jv+lsXJx6RuZaemy4aPif5+y0iRiD8SbrRLZ6WBaC4zydhYLXdo6XpnBwleZoemrWp5P3Dw==",
"cpu": [
"x64"
],
@@ -408,9 +408,9 @@
]
},
"node_modules/@lancedb/vectordb-win32-arm64-msvc": {
"version": "0.16.1-beta.3",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-win32-arm64-msvc/-/vectordb-win32-arm64-msvc-0.16.1-beta.3.tgz",
"integrity": "sha512-1dbUSg+Mi+0W8JAUXqNWC+uCr0RUqVHhxFVGLSlprqZ8qFJYQ61jFSZr4onOYj9Ta1n6tUb3Nc4acxf3vXXPmw==",
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-win32-arm64-msvc/-/vectordb-win32-arm64-msvc-0.17.0.tgz",
"integrity": "sha512-yX4PLLVckWurBNbYvq/tKreBwEm09Rua28Y4yvFJRiV3X/RbOd7PDQcZBolsXUoDnuqBfNwmQDjGNvnWhgFk+Q==",
"cpu": [
"arm64"
],
@@ -421,9 +421,9 @@
]
},
"node_modules/@lancedb/vectordb-win32-x64-msvc": {
"version": "0.16.1-beta.3",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-win32-x64-msvc/-/vectordb-win32-x64-msvc-0.16.1-beta.3.tgz",
"integrity": "sha512-K9oT47zKnFoCEB/JjVKG+w+L0GOMDsPPln+B2TvefAXAWrvweCN2H4LUdsBYCTnntzy80OJCwwH3OwX07M1Y3g==",
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/@lancedb/vectordb-win32-x64-msvc/-/vectordb-win32-x64-msvc-0.17.0.tgz",
"integrity": "sha512-f5ZEZj5yvfL2wPeJKOtbvzmYUn/jg2ab0fukZQX2LTzMQIUQ0kAF6UwxinmMB4R33giNwhHEfrAMykbG/G0c4g==",
"cpu": [
"x64"
],

View File

@@ -1,6 +1,6 @@
{
"name": "vectordb",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"description": " Serverless, low-latency vector database for AI applications",
"private": false,
"main": "dist/index.js",
@@ -92,13 +92,13 @@
}
},
"optionalDependencies": {
"@lancedb/vectordb-darwin-x64": "0.16.1-beta.3",
"@lancedb/vectordb-darwin-arm64": "0.16.1-beta.3",
"@lancedb/vectordb-linux-x64-gnu": "0.16.1-beta.3",
"@lancedb/vectordb-linux-arm64-gnu": "0.16.1-beta.3",
"@lancedb/vectordb-linux-x64-musl": "0.16.1-beta.3",
"@lancedb/vectordb-linux-arm64-musl": "0.16.1-beta.3",
"@lancedb/vectordb-win32-x64-msvc": "0.16.1-beta.3",
"@lancedb/vectordb-win32-arm64-msvc": "0.16.1-beta.3"
"@lancedb/vectordb-darwin-x64": "0.17.0",
"@lancedb/vectordb-darwin-arm64": "0.17.0",
"@lancedb/vectordb-linux-x64-gnu": "0.17.0",
"@lancedb/vectordb-linux-arm64-gnu": "0.17.0",
"@lancedb/vectordb-linux-x64-musl": "0.17.0",
"@lancedb/vectordb-linux-arm64-musl": "0.17.0",
"@lancedb/vectordb-win32-x64-msvc": "0.17.0",
"@lancedb/vectordb-win32-arm64-msvc": "0.17.0"
}
}

View File

@@ -1,7 +1,7 @@
[package]
name = "lancedb-nodejs"
edition.workspace = true
version = "0.16.1-beta.3"
version = "0.17.0"
license.workspace = true
description.workspace = true
repository.workspace = true

View File

@@ -666,11 +666,11 @@ describe("When creating an index", () => {
expect(fs.readdirSync(indexDir)).toHaveLength(1);
for await (const r of tbl.query().where("id > 1").select(["id"])) {
expect(r.numRows).toBe(10);
expect(r.numRows).toBe(298);
}
// should also work with 'filter' alias
for await (const r of tbl.query().filter("id > 1").select(["id"])) {
expect(r.numRows).toBe(10);
expect(r.numRows).toBe(298);
}
});

View File

@@ -1,6 +1,6 @@
{
"name": "@lancedb/lancedb-darwin-arm64",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"os": ["darwin"],
"cpu": ["arm64"],
"main": "lancedb.darwin-arm64.node",

View File

@@ -1,6 +1,6 @@
{
"name": "@lancedb/lancedb-darwin-x64",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"os": ["darwin"],
"cpu": ["x64"],
"main": "lancedb.darwin-x64.node",

View File

@@ -1,6 +1,6 @@
{
"name": "@lancedb/lancedb-linux-arm64-gnu",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"os": ["linux"],
"cpu": ["arm64"],
"main": "lancedb.linux-arm64-gnu.node",

View File

@@ -1,6 +1,6 @@
{
"name": "@lancedb/lancedb-linux-arm64-musl",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"os": ["linux"],
"cpu": ["arm64"],
"main": "lancedb.linux-arm64-musl.node",

View File

@@ -1,6 +1,6 @@
{
"name": "@lancedb/lancedb-linux-x64-gnu",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"os": ["linux"],
"cpu": ["x64"],
"main": "lancedb.linux-x64-gnu.node",

View File

@@ -1,6 +1,6 @@
{
"name": "@lancedb/lancedb-linux-x64-musl",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"os": ["linux"],
"cpu": ["x64"],
"main": "lancedb.linux-x64-musl.node",

View File

@@ -1,6 +1,6 @@
{
"name": "@lancedb/lancedb-win32-arm64-msvc",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"os": [
"win32"
],

View File

@@ -1,6 +1,6 @@
{
"name": "@lancedb/lancedb-win32-x64-msvc",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"os": ["win32"],
"cpu": ["x64"],
"main": "lancedb.win32-x64-msvc.node",

View File

@@ -1,12 +1,12 @@
{
"name": "@lancedb/lancedb",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lancedb/lancedb",
"version": "0.16.1-beta.3",
"version": "0.17.0",
"cpu": [
"x64",
"arm64"

View File

@@ -11,7 +11,7 @@
"ann"
],
"private": false,
"version": "0.16.1-beta.3",
"version": "0.17.0",
"main": "dist/index.js",
"exports": {
".": "./dist/index.js",

View File

@@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "0.20.0"
current_version = "0.21.0-beta.0"
parse = """(?x)
(?P<major>0|[1-9]\\d*)\\.
(?P<minor>0|[1-9]\\d*)\\.

View File

@@ -1,6 +1,6 @@
[package]
name = "lancedb-python"
version = "0.20.0"
version = "0.21.0-beta.0"
edition.workspace = true
description = "Python bindings for LanceDB"
license.workspace = true

View File

@@ -110,7 +110,7 @@ class Query(pydantic.BaseModel):
full_text_query: Optional[Union[str, dict]] = None
# top k results to return
k: int
k: Optional[int] = None
# # metrics
metric: str = "L2"
@@ -257,7 +257,7 @@ class LanceQueryBuilder(ABC):
def __init__(self, table: "Table"):
self._table = table
self._limit = 10
self._limit = None
self._offset = 0
self._columns = None
self._where = None
@@ -370,8 +370,7 @@ class LanceQueryBuilder(ABC):
The maximum number of results to return.
The default query limit is 10 results.
For ANN/KNN queries, you must specify a limit.
Entering 0, a negative number, or None will reset
the limit to the default value of 10.
For plain searches, all records are returned if limit not set.
*WARNING* if you have a large dataset, setting
the limit to a large number, e.g. the table size,
can potentially result in reading a
@@ -595,6 +594,8 @@ class LanceVectorQueryBuilder(LanceQueryBuilder):
fast_search: bool = False,
):
super().__init__(table)
if self._limit is None:
self._limit = 10
self._query = query
self._distance_type = "L2"
self._nprobes = 20
@@ -888,6 +889,8 @@ class LanceFtsQueryBuilder(LanceQueryBuilder):
fts_columns: Union[str, List[str]] = [],
):
super().__init__(table)
if self._limit is None:
self._limit = 10
self._query = query
self._phrase_query = False
self.ordering_field_name = ordering_field_name
@@ -1055,7 +1058,7 @@ class LanceEmptyQueryBuilder(LanceQueryBuilder):
query = Query(
columns=self._columns,
filter=self._where,
k=self._limit or 10,
k=self._limit,
with_row_id=self._with_row_id,
vector=[],
# not actually respected in remote query

View File

@@ -3195,7 +3195,9 @@ class AsyncTable:
# The sync remote table calls into this method, so we need to map the
# query to the async version of the query and run that here. This is only
# used for that code path right now.
async_query = self.query().limit(query.k)
async_query = self.query()
if query.k is not None:
async_query = async_query.limit(query.k)
if query.offset > 0:
async_query = async_query.offset(query.offset)
if query.columns:

View File

@@ -174,6 +174,10 @@ def test_search_fts(table, use_tantivy):
assert len(results) == 5
assert len(results[0]) == 3 # id, text, _score
# Default limit of 10
results = table.search("puppy").select(["id", "text"]).to_list()
assert len(results) == 10
@pytest.mark.asyncio
async def test_fts_select_async(async_table):

View File

@@ -1025,13 +1025,13 @@ def test_empty_query(mem_db: DBConnection):
table = mem_db.create_table("my_table2", data=[{"id": i} for i in range(100)])
df = table.search().select(["id"]).to_pandas()
assert len(df) == 10
assert len(df) == 100
# None is the same as default
df = table.search().select(["id"]).limit(None).to_pandas()
assert len(df) == 10
assert len(df) == 100
# invalid limist is the same as None, wihch is the same as default
df = table.search().select(["id"]).limit(-1).to_pandas()
assert len(df) == 10
assert len(df) == 100
# valid limit should work
df = table.search().select(["id"]).limit(42).to_pandas()
assert len(df) == 42

View File

@@ -1,6 +1,6 @@
[package]
name = "lancedb-node"
version = "0.16.1-beta.3"
version = "0.17.0"
description = "Serverless, low-latency vector database for AI applications"
license.workspace = true
edition.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "lancedb"
version = "0.16.1-beta.3"
version = "0.17.0"
edition.workspace = true
description = "LanceDB: A serverless, low-latency vector database for AI applications"
license.workspace = true

View File

@@ -470,6 +470,9 @@ impl<T: HasQuery> QueryBase for T {
}
fn full_text_search(mut self, query: FullTextSearchQuery) -> Self {
if self.mut_query().limit.is_none() {
self.mut_query().limit = Some(DEFAULT_TOP_K);
}
self.mut_query().full_text_search = Some(query);
self
}
@@ -634,7 +637,7 @@ pub struct QueryRequest {
impl Default for QueryRequest {
fn default() -> Self {
Self {
limit: Some(DEFAULT_TOP_K),
limit: None,
offset: None,
filter: None,
full_text_search: None,
@@ -719,6 +722,11 @@ impl Query {
let mut vector_query = self.into_vector();
let query_vector = vector.to_query_vector(&DataType::Float32, "default")?;
vector_query.request.query_vector.push(query_vector);
if vector_query.request.base.limit.is_none() {
vector_query.request.base.limit = Some(DEFAULT_TOP_K);
}
Ok(vector_query)
}

View File

@@ -154,9 +154,9 @@ impl<S: HttpSend> RemoteTable<S> {
body["offset"] = serde_json::Value::Number(serde_json::Number::from(offset));
}
if let Some(limit) = params.limit {
body["k"] = serde_json::Value::Number(serde_json::Number::from(limit));
}
// Server requires k.
let limit = params.limit.unwrap_or(usize::MAX);
body["k"] = serde_json::Value::Number(serde_json::Number::from(limit));
if let Some(filter) = &params.filter {
if let QueryFilter::Sql(filter) = filter {
@@ -1293,6 +1293,52 @@ mod tests {
table.delete("id in (1, 2, 3)").await.unwrap();
}
#[tokio::test]
async fn test_query_plain() {
let expected_data = RecordBatch::try_new(
Arc::new(Schema::new(vec![Field::new("a", DataType::Int32, false)])),
vec![Arc::new(Int32Array::from(vec![1, 2, 3]))],
)
.unwrap();
let expected_data_ref = expected_data.clone();
let table = Table::new_with_handler("my_table", move |request| {
assert_eq!(request.method(), "POST");
assert_eq!(request.url().path(), "/v1/table/my_table/query/");
assert_eq!(
request.headers().get("Content-Type").unwrap(),
JSON_CONTENT_TYPE
);
let body = request.body().unwrap().as_bytes().unwrap();
let body: serde_json::Value = serde_json::from_slice(body).unwrap();
let expected_body = serde_json::json!({
"k": usize::MAX,
"prefilter": true,
"vector": [], // Empty vector means no vector query.
"version": null,
});
assert_eq!(body, expected_body);
let response_body = write_ipc_file(&expected_data_ref);
http::Response::builder()
.status(200)
.header(CONTENT_TYPE, ARROW_FILE_CONTENT_TYPE)
.body(response_body)
.unwrap()
});
let data = table
.query()
.execute()
.await
.unwrap()
.collect::<Vec<_>>()
.await;
assert_eq!(data.len(), 1);
assert_eq!(data[0].as_ref().unwrap(), &expected_data);
}
#[tokio::test]
async fn test_query_vector_default_values() {
let expected_data = RecordBatch::try_new(