mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-11 06:12:58 +00:00
Compare commits
4 Commits
codex/upda
...
python-v0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff20d12f20 | ||
|
|
5f3e133470 | ||
|
|
332e722a64 | ||
|
|
3f63c4f8d9 |
4
.github/workflows/nodejs.yml
vendored
4
.github/workflows/nodejs.yml
vendored
@@ -88,7 +88,7 @@ jobs:
|
|||||||
npm install -g @napi-rs/cli
|
npm install -g @napi-rs/cli
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci --include=optional
|
||||||
npm run build:debug -- --profile ci
|
npm run build:debug -- --profile ci
|
||||||
npm run tsc
|
npm run tsc
|
||||||
- name: Setup localstack
|
- name: Setup localstack
|
||||||
@@ -146,7 +146,7 @@ jobs:
|
|||||||
npm install -g @napi-rs/cli
|
npm install -g @napi-rs/cli
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci --include=optional
|
||||||
npm run build:debug -- --profile ci
|
npm run build:debug -- --profile ci
|
||||||
npm run tsc
|
npm run tsc
|
||||||
- name: Test
|
- name: Test
|
||||||
|
|||||||
6
.github/workflows/python.yml
vendored
6
.github/workflows/python.yml
vendored
@@ -49,8 +49,8 @@ jobs:
|
|||||||
|
|
||||||
type-check:
|
type-check:
|
||||||
name: "Type Check"
|
name: "Type Check"
|
||||||
timeout-minutes: 30
|
timeout-minutes: 60
|
||||||
runs-on: "ubuntu-22.04"
|
runs-on: ubuntu-2404-8x-x64
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -78,7 +78,7 @@ jobs:
|
|||||||
|
|
||||||
doctest:
|
doctest:
|
||||||
name: "Doctest"
|
name: "Doctest"
|
||||||
timeout-minutes: 30
|
timeout-minutes: 60
|
||||||
runs-on: ubuntu-2404-8x-x64
|
runs-on: ubuntu-2404-8x-x64
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
|||||||
75
Cargo.lock
generated
75
Cargo.lock
generated
@@ -3086,8 +3086,8 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fsst"
|
name = "fsst"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"rand 0.9.2",
|
"rand 0.9.2",
|
||||||
@@ -4422,8 +4422,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance"
|
name = "lance"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-arith",
|
"arrow-arith",
|
||||||
@@ -4488,14 +4488,13 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-arrow"
|
name = "lance-arrow"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"arrow-buffer",
|
"arrow-buffer",
|
||||||
"arrow-cast",
|
"arrow-cast",
|
||||||
"arrow-data",
|
"arrow-data",
|
||||||
"arrow-ord",
|
|
||||||
"arrow-schema",
|
"arrow-schema",
|
||||||
"arrow-select",
|
"arrow-select",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -4508,8 +4507,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-bitpacking"
|
name = "lance-bitpacking"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayref",
|
"arrayref",
|
||||||
"paste",
|
"paste",
|
||||||
@@ -4518,8 +4517,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-core"
|
name = "lance-core"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"arrow-buffer",
|
"arrow-buffer",
|
||||||
@@ -4532,7 +4531,6 @@ dependencies = [
|
|||||||
"datafusion-sql",
|
"datafusion-sql",
|
||||||
"deepsize",
|
"deepsize",
|
||||||
"futures",
|
"futures",
|
||||||
"itertools 0.13.0",
|
|
||||||
"lance-arrow",
|
"lance-arrow",
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
@@ -4556,8 +4554,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-datafusion"
|
name = "lance-datafusion"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
@@ -4587,8 +4585,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-datagen"
|
name = "lance-datagen"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
@@ -4605,8 +4603,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-encoding"
|
name = "lance-encoding"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-arith",
|
"arrow-arith",
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
@@ -4643,8 +4641,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-file"
|
name = "lance-file"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-arith",
|
"arrow-arith",
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
@@ -4676,8 +4674,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-geo"
|
name = "lance-geo"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"datafusion",
|
"datafusion",
|
||||||
"geo-types",
|
"geo-types",
|
||||||
@@ -4688,8 +4686,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-index"
|
name = "lance-index"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-arith",
|
"arrow-arith",
|
||||||
@@ -4735,7 +4733,6 @@ dependencies = [
|
|||||||
"prost-types",
|
"prost-types",
|
||||||
"rand 0.9.2",
|
"rand 0.9.2",
|
||||||
"rand_distr 0.5.1",
|
"rand_distr 0.5.1",
|
||||||
"rangemap",
|
|
||||||
"rayon",
|
"rayon",
|
||||||
"roaring",
|
"roaring",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -4751,8 +4748,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-io"
|
name = "lance-io"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-arith",
|
"arrow-arith",
|
||||||
@@ -4792,8 +4789,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-linalg"
|
name = "lance-linalg"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"arrow-buffer",
|
"arrow-buffer",
|
||||||
@@ -4809,8 +4806,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-namespace"
|
name = "lance-namespace"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -4822,8 +4819,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-namespace-impls"
|
name = "lance-namespace-impls"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-ipc",
|
"arrow-ipc",
|
||||||
@@ -4848,9 +4845,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-namespace-reqwest-client"
|
name = "lance-namespace-reqwest-client"
|
||||||
version = "0.3.1"
|
version = "0.0.18"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b748e89a3a0e5d9fb1b51e4382f783f8aa6b620d755012d4856180968014e619"
|
checksum = "3ea349999bcda4eea53fc05d334b3775ec314761e6a706555c777d7a29b18d19"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -4861,8 +4858,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-table"
|
name = "lance-table"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow",
|
"arrow",
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
@@ -4901,8 +4898,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lance-testing"
|
name = "lance-testing"
|
||||||
version = "2.0.0-beta.2"
|
version = "1.0.0"
|
||||||
source = "git+https://github.com/lance-format/lance.git?tag=v2.0.0-beta.2#92aa361099f42a40e9aa9f9915d041fe1dd30671"
|
source = "git+https://github.com/lance-format/lance.git?tag=v1.0.0#a0979691926f57afd5d3ac90bf6e5bb11188c0c3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrow-array",
|
"arrow-array",
|
||||||
"arrow-schema",
|
"arrow-schema",
|
||||||
|
|||||||
28
Cargo.toml
28
Cargo.toml
@@ -15,20 +15,20 @@ categories = ["database-implementations"]
|
|||||||
rust-version = "1.78.0"
|
rust-version = "1.78.0"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
lance = { "version" = "=2.0.0-beta.2", default-features = false, "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance = { "version" = "=1.0.0", default-features = false, "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-core = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-core = { "version" = "=1.0.0", "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-datagen = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-datagen = { "version" = "=1.0.0", "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-file = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-file = { "version" = "=1.0.0", "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-io = { "version" = "=2.0.0-beta.2", default-features = false, "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-io = { "version" = "=1.0.0", default-features = false, "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-index = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-index = { "version" = "=1.0.0", "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-linalg = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-linalg = { "version" = "=1.0.0", "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-namespace = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-namespace = { "version" = "=1.0.0", "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-namespace-impls = { "version" = "=2.0.0-beta.2", default-features = false, "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-namespace-impls = { "version" = "=1.0.0", default-features = false, "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-table = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-table = { "version" = "=1.0.0", "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-testing = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-testing = { "version" = "=1.0.0", "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-datafusion = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-datafusion = { "version" = "=1.0.0", "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-encoding = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-encoding = { "version" = "=1.0.0", "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
lance-arrow = { "version" = "=2.0.0-beta.2", "tag" = "v2.0.0-beta.2", "git" = "https://github.com/lance-format/lance.git" }
|
lance-arrow = { "version" = "=1.0.0", "tag" = "v1.0.0", "git" = "https://github.com/lance-format/lance.git" }
|
||||||
ahash = "0.8"
|
ahash = "0.8"
|
||||||
# Note that this one does not include pyarrow
|
# Note that this one does not include pyarrow
|
||||||
arrow = { version = "56.2", optional = false }
|
arrow = { version = "56.2", optional = false }
|
||||||
|
|||||||
@@ -229,6 +229,29 @@ def set_local_version():
|
|||||||
update_cargo_toml(line_updater)
|
update_cargo_toml(line_updater)
|
||||||
|
|
||||||
|
|
||||||
|
def update_lockfiles(version: str, fallback_to_git: bool = False):
|
||||||
|
"""
|
||||||
|
Update Cargo metadata and optionally fall back to using the git tag if the
|
||||||
|
requested crates.io version is unavailable.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
print("Updating lockfiles...", file=sys.stderr, end="")
|
||||||
|
run_command("cargo metadata > /dev/null")
|
||||||
|
print(" done.", file=sys.stderr)
|
||||||
|
except Exception as e:
|
||||||
|
if fallback_to_git and "failed to select a version" in str(e):
|
||||||
|
print(
|
||||||
|
f" failed for crates.io v{version}, retrying with git tag...",
|
||||||
|
file=sys.stderr,
|
||||||
|
)
|
||||||
|
set_preview_version(version)
|
||||||
|
print("Updating lockfiles...", file=sys.stderr, end="")
|
||||||
|
run_command("cargo metadata > /dev/null")
|
||||||
|
print(" done.", file=sys.stderr)
|
||||||
|
else:
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="Set the version of the Lance package.")
|
parser = argparse.ArgumentParser(description="Set the version of the Lance package.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"version",
|
"version",
|
||||||
@@ -244,6 +267,7 @@ if args.version == "stable":
|
|||||||
file=sys.stderr,
|
file=sys.stderr,
|
||||||
)
|
)
|
||||||
set_stable_version(latest_stable_version)
|
set_stable_version(latest_stable_version)
|
||||||
|
update_lockfiles(latest_stable_version)
|
||||||
elif args.version == "preview":
|
elif args.version == "preview":
|
||||||
latest_preview_version = get_latest_preview_version()
|
latest_preview_version = get_latest_preview_version()
|
||||||
print(
|
print(
|
||||||
@@ -251,8 +275,10 @@ elif args.version == "preview":
|
|||||||
file=sys.stderr,
|
file=sys.stderr,
|
||||||
)
|
)
|
||||||
set_preview_version(latest_preview_version)
|
set_preview_version(latest_preview_version)
|
||||||
|
update_lockfiles(latest_preview_version)
|
||||||
elif args.version == "local":
|
elif args.version == "local":
|
||||||
set_local_version()
|
set_local_version()
|
||||||
|
update_lockfiles("local")
|
||||||
else:
|
else:
|
||||||
# Parse the version number.
|
# Parse the version number.
|
||||||
version = args.version
|
version = args.version
|
||||||
@@ -262,9 +288,7 @@ else:
|
|||||||
|
|
||||||
if "beta" in version:
|
if "beta" in version:
|
||||||
set_preview_version(version)
|
set_preview_version(version)
|
||||||
|
update_lockfiles(version)
|
||||||
else:
|
else:
|
||||||
set_stable_version(version)
|
set_stable_version(version)
|
||||||
|
update_lockfiles(version, fallback_to_git=True)
|
||||||
print("Updating lockfiles...", file=sys.stderr, end="")
|
|
||||||
run_command("cargo metadata > /dev/null")
|
|
||||||
print(" done.", file=sys.stderr)
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[tool.bumpversion]
|
[tool.bumpversion]
|
||||||
current_version = "0.26.0-beta.1"
|
current_version = "0.26.0"
|
||||||
parse = """(?x)
|
parse = """(?x)
|
||||||
(?P<major>0|[1-9]\\d*)\\.
|
(?P<major>0|[1-9]\\d*)\\.
|
||||||
(?P<minor>0|[1-9]\\d*)\\.
|
(?P<minor>0|[1-9]\\d*)\\.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "lancedb-python"
|
name = "lancedb-python"
|
||||||
version = "0.26.0-beta.1"
|
version = "0.26.0"
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
description = "Python bindings for LanceDB"
|
description = "Python bindings for LanceDB"
|
||||||
license.workspace = true
|
license.workspace = true
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ dependencies = [
|
|||||||
"pyarrow>=16",
|
"pyarrow>=16",
|
||||||
"pydantic>=1.10",
|
"pydantic>=1.10",
|
||||||
"tqdm>=4.27.0",
|
"tqdm>=4.27.0",
|
||||||
"lance-namespace>=0.2.1"
|
"lance-namespace>=0.3.2"
|
||||||
]
|
]
|
||||||
description = "lancedb"
|
description = "lancedb"
|
||||||
authors = [{ name = "LanceDB Devs", email = "dev@lancedb.com" }]
|
authors = [{ name = "LanceDB Devs", email = "dev@lancedb.com" }]
|
||||||
|
|||||||
@@ -325,11 +325,11 @@ impl Connection {
|
|||||||
let inner = self_.get_inner()?.clone();
|
let inner = self_.get_inner()?.clone();
|
||||||
let py = self_.py();
|
let py = self_.py();
|
||||||
future_into_py(py, async move {
|
future_into_py(py, async move {
|
||||||
use lance_namespace::models::CreateNamespaceRequest;
|
use lance_namespace::models::{create_namespace_request, CreateNamespaceRequest};
|
||||||
let mode_enum = mode.and_then(|m| match m.to_lowercase().as_str() {
|
let mode_enum = mode.and_then(|m| match m.to_lowercase().as_str() {
|
||||||
"create" => Some("Create".to_string()),
|
"create" => Some(create_namespace_request::Mode::Create),
|
||||||
"exist_ok" => Some("ExistOk".to_string()),
|
"exist_ok" => Some(create_namespace_request::Mode::ExistOk),
|
||||||
"overwrite" => Some("Overwrite".to_string()),
|
"overwrite" => Some(create_namespace_request::Mode::Overwrite),
|
||||||
_ => None,
|
_ => None,
|
||||||
});
|
});
|
||||||
let request = CreateNamespaceRequest {
|
let request = CreateNamespaceRequest {
|
||||||
@@ -360,15 +360,15 @@ impl Connection {
|
|||||||
let inner = self_.get_inner()?.clone();
|
let inner = self_.get_inner()?.clone();
|
||||||
let py = self_.py();
|
let py = self_.py();
|
||||||
future_into_py(py, async move {
|
future_into_py(py, async move {
|
||||||
use lance_namespace::models::DropNamespaceRequest;
|
use lance_namespace::models::{drop_namespace_request, DropNamespaceRequest};
|
||||||
let mode_enum = mode.and_then(|m| match m.to_uppercase().as_str() {
|
let mode_enum = mode.and_then(|m| match m.to_uppercase().as_str() {
|
||||||
"SKIP" => Some("Skip".to_string()),
|
"SKIP" => Some(drop_namespace_request::Mode::Skip),
|
||||||
"FAIL" => Some("Fail".to_string()),
|
"FAIL" => Some(drop_namespace_request::Mode::Fail),
|
||||||
_ => None,
|
_ => None,
|
||||||
});
|
});
|
||||||
let behavior_enum = behavior.and_then(|b| match b.to_uppercase().as_str() {
|
let behavior_enum = behavior.and_then(|b| match b.to_uppercase().as_str() {
|
||||||
"RESTRICT" => Some("Restrict".to_string()),
|
"RESTRICT" => Some(drop_namespace_request::Behavior::Restrict),
|
||||||
"CASCADE" => Some("Cascade".to_string()),
|
"CASCADE" => Some(drop_namespace_request::Behavior::Cascade),
|
||||||
_ => None,
|
_ => None,
|
||||||
});
|
});
|
||||||
let request = DropNamespaceRequest {
|
let request = DropNamespaceRequest {
|
||||||
|
|||||||
@@ -208,7 +208,6 @@ impl Database for LanceNamespaceDatabase {
|
|||||||
let describe_request = DescribeTableRequest {
|
let describe_request = DescribeTableRequest {
|
||||||
id: Some(table_id.clone()),
|
id: Some(table_id.clone()),
|
||||||
version: None,
|
version: None,
|
||||||
with_table_uri: Some(true),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let describe_result = self.namespace.describe_table(describe_request).await;
|
let describe_result = self.namespace.describe_table(describe_request).await;
|
||||||
@@ -335,7 +334,6 @@ impl Database for LanceNamespaceDatabase {
|
|||||||
let describe_request = DescribeTableRequest {
|
let describe_request = DescribeTableRequest {
|
||||||
id: Some(table_id.clone()),
|
id: Some(table_id.clone()),
|
||||||
version: None,
|
version: None,
|
||||||
with_table_uri: Some(true),
|
|
||||||
};
|
};
|
||||||
let response = self
|
let response = self
|
||||||
.namespace
|
.namespace
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ use lance_index::vector::sq::builder::SQBuildParams;
|
|||||||
use lance_index::DatasetIndexExt;
|
use lance_index::DatasetIndexExt;
|
||||||
use lance_index::IndexType;
|
use lance_index::IndexType;
|
||||||
use lance_namespace::models::{
|
use lance_namespace::models::{
|
||||||
QueryTableRequest as NsQueryTableRequest, QueryTableRequestColumns,
|
QueryTableRequest as NsQueryTableRequest, QueryTableRequestFullTextQuery,
|
||||||
QueryTableRequestFullTextQuery, QueryTableRequestVector, StringFtsQuery,
|
QueryTableRequestVector, StringFtsQuery,
|
||||||
};
|
};
|
||||||
use lance_namespace::LanceNamespace;
|
use lance_namespace::LanceNamespace;
|
||||||
use lance_table::format::Manifest;
|
use lance_table::format::Manifest;
|
||||||
@@ -2152,10 +2152,7 @@ impl NativeTable {
|
|||||||
// Convert select to columns list
|
// Convert select to columns list
|
||||||
let columns = match &vq.base.select {
|
let columns = match &vq.base.select {
|
||||||
Select::All => None,
|
Select::All => None,
|
||||||
Select::Columns(cols) => Some(Box::new(QueryTableRequestColumns {
|
Select::Columns(cols) => Some(cols.clone()),
|
||||||
column_names: Some(cols.clone()),
|
|
||||||
column_aliases: None,
|
|
||||||
})),
|
|
||||||
Select::Dynamic(_) => {
|
Select::Dynamic(_) => {
|
||||||
return Err(Error::NotSupported {
|
return Err(Error::NotSupported {
|
||||||
message:
|
message:
|
||||||
@@ -2228,10 +2225,7 @@ impl NativeTable {
|
|||||||
|
|
||||||
let columns = match &q.select {
|
let columns = match &q.select {
|
||||||
Select::All => None,
|
Select::All => None,
|
||||||
Select::Columns(cols) => Some(Box::new(QueryTableRequestColumns {
|
Select::Columns(cols) => Some(cols.clone()),
|
||||||
column_names: Some(cols.clone()),
|
|
||||||
column_aliases: None,
|
|
||||||
})),
|
|
||||||
Select::Dynamic(_) => {
|
Select::Dynamic(_) => {
|
||||||
return Err(Error::NotSupported {
|
return Err(Error::NotSupported {
|
||||||
message: "Dynamic columns are not supported for server-side query"
|
message: "Dynamic columns are not supported for server-side query"
|
||||||
@@ -4956,13 +4950,7 @@ mod tests {
|
|||||||
assert_eq!(ns_request.k, 10);
|
assert_eq!(ns_request.k, 10);
|
||||||
assert_eq!(ns_request.offset, Some(5));
|
assert_eq!(ns_request.offset, Some(5));
|
||||||
assert_eq!(ns_request.filter, Some("id > 0".to_string()));
|
assert_eq!(ns_request.filter, Some("id > 0".to_string()));
|
||||||
assert_eq!(
|
assert_eq!(ns_request.columns, Some(vec!["id".to_string()]));
|
||||||
ns_request.columns,
|
|
||||||
Some(Box::new(QueryTableRequestColumns {
|
|
||||||
column_names: Some(vec!["id".to_string()]),
|
|
||||||
column_aliases: None,
|
|
||||||
}))
|
|
||||||
);
|
|
||||||
assert_eq!(ns_request.vector_column, Some("vector".to_string()));
|
assert_eq!(ns_request.vector_column, Some("vector".to_string()));
|
||||||
assert_eq!(ns_request.distance_type, Some("l2".to_string()));
|
assert_eq!(ns_request.distance_type, Some("l2".to_string()));
|
||||||
assert!(ns_request.vector.single_vector.is_some());
|
assert!(ns_request.vector.single_vector.is_some());
|
||||||
@@ -5003,13 +4991,7 @@ mod tests {
|
|||||||
assert_eq!(ns_request.k, 20);
|
assert_eq!(ns_request.k, 20);
|
||||||
assert_eq!(ns_request.offset, Some(5));
|
assert_eq!(ns_request.offset, Some(5));
|
||||||
assert_eq!(ns_request.filter, Some("id > 5".to_string()));
|
assert_eq!(ns_request.filter, Some("id > 5".to_string()));
|
||||||
assert_eq!(
|
assert_eq!(ns_request.columns, Some(vec!["id".to_string()]));
|
||||||
ns_request.columns,
|
|
||||||
Some(Box::new(QueryTableRequestColumns {
|
|
||||||
column_names: Some(vec!["id".to_string()]),
|
|
||||||
column_aliases: None,
|
|
||||||
}))
|
|
||||||
);
|
|
||||||
assert_eq!(ns_request.with_row_id, Some(true));
|
assert_eq!(ns_request.with_row_id, Some(true));
|
||||||
assert_eq!(ns_request.bypass_vector_index, Some(true));
|
assert_eq!(ns_request.bypass_vector_index, Some(true));
|
||||||
assert!(ns_request.vector_column.is_none()); // No vector column for plain queries
|
assert!(ns_request.vector_column.is_none()); // No vector column for plain queries
|
||||||
|
|||||||
Reference in New Issue
Block a user