From 9a79107651c2ae45f3144e88e762ee2a2223b3a7 Mon Sep 17 00:00:00 2001 From: Jack Ye Date: Sun, 29 Nov 2026 18:38:40 -0800 Subject: [PATCH] chore: align Lance revision for strict FTS prewarm --- .github/workflows/nodejs.yml | 2 +- .github/workflows/rust.yml | 11 +++-- Cargo.lock | 48 +++++++++++----------- Cargo.toml | 30 +++++++------- python/python/tests/test_s3_bucket_dots.py | 24 +++++++---- rust/lancedb/src/table/computed_columns.rs | 21 ++++++---- 6 files changed, 76 insertions(+), 60 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 94e93392a..7c7d0eb48 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -163,7 +163,7 @@ jobs: NODE_OPTIONS: "--experimental-vm-modules" # Invoke the installed jest binary directly; the pnpm shim is set up # against the build-phase Node, not the version selected above. - run: node_modules/.bin/jest --verbose + run: node_modules/.bin/jest --verbose --runInBand - name: Test examples working-directory: ./ env: diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6d9a9911d..4b62420e7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,7 +43,7 @@ jobs: steps: - uses: actions/checkout@v6 - uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 - - name: Read the pinned Lance tag + - name: Read the pinned Lance ref id: lance run: | python3 - <<'PYTHON' @@ -52,14 +52,17 @@ jobs: from pathlib import Path manifest = tomllib.loads(Path("Cargo.toml").read_text()) - tag = manifest["workspace"]["dependencies"]["lance"]["tag"] + pin = manifest["workspace"]["dependencies"]["lance"] + ref = pin.get("rev") or pin.get("tag") + if not ref: + raise SystemExit("Lance must be pinned to a commit or tag") with open(os.environ["GITHUB_OUTPUT"], "a") as output: - output.write(f"tag={tag}\n") + output.write(f"ref={ref}\n") PYTHON - uses: actions/checkout@v6 with: repository: lance-format/lance - ref: ${{ steps.lance.outputs.tag }} + ref: ${{ steps.lance.outputs.ref }} path: local-lance - name: Resolve a downstream workspace with a local Lance override run: | diff --git a/Cargo.lock b/Cargo.lock index 506f62f5f..a2a8bd2de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3837,7 +3837,7 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] name = "fsst" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow-array", "rand 0.9.5", @@ -5316,7 +5316,7 @@ checksum = "e037a2e1d8d5fdbd49b16a4ea09d5d6401c1f29eca5ff29d03d3824dba16256a" [[package]] name = "lance" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arc-swap", "arrow", @@ -5393,7 +5393,7 @@ dependencies = [ [[package]] name = "lance-arrow" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow-array", "arrow-buffer", @@ -5417,7 +5417,7 @@ dependencies = [ [[package]] name = "lance-bitpacking" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrayref", "crunchy", @@ -5428,7 +5428,7 @@ dependencies = [ [[package]] name = "lance-core" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow-array", "arrow-buffer", @@ -5467,7 +5467,7 @@ dependencies = [ [[package]] name = "lance-datafusion" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow", "arrow-array", @@ -5499,7 +5499,7 @@ dependencies = [ [[package]] name = "lance-datafusion-exec" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow", "arrow-array", @@ -5526,7 +5526,7 @@ dependencies = [ [[package]] name = "lance-datagen" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow", "arrow-array", @@ -5544,7 +5544,7 @@ dependencies = [ [[package]] name = "lance-derive" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "proc-macro2", "quote", @@ -5554,7 +5554,7 @@ dependencies = [ [[package]] name = "lance-encoding" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow-arith", "arrow-array", @@ -5589,7 +5589,7 @@ dependencies = [ [[package]] name = "lance-file" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow-arith", "arrow-array", @@ -5620,7 +5620,7 @@ dependencies = [ [[package]] name = "lance-geo" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow-array", "arrow-schema", @@ -5652,7 +5652,7 @@ dependencies = [ [[package]] name = "lance-index" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arc-swap", "arrow", @@ -5725,7 +5725,7 @@ dependencies = [ [[package]] name = "lance-index-core" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow-array", "arrow-schema", @@ -5749,7 +5749,7 @@ dependencies = [ [[package]] name = "lance-io" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow", "arrow-array", @@ -5795,7 +5795,7 @@ dependencies = [ [[package]] name = "lance-jsonb" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "byteorder", "ethnum", @@ -5813,7 +5813,7 @@ dependencies = [ [[package]] name = "lance-linalg" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "argminmax 0.7.1", "arrow-array", @@ -5829,7 +5829,7 @@ dependencies = [ [[package]] name = "lance-namespace" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow", "async-trait", @@ -5844,7 +5844,7 @@ dependencies = [ [[package]] name = "lance-namespace-impls" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arc-swap", "arrow", @@ -5899,7 +5899,7 @@ dependencies = [ [[package]] name = "lance-select" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow-array", "arrow-buffer", @@ -5914,7 +5914,7 @@ dependencies = [ [[package]] name = "lance-table" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow", "arrow-array", @@ -5956,7 +5956,7 @@ dependencies = [ [[package]] name = "lance-table-runtime" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow-array", "arrow-buffer", @@ -6001,7 +6001,7 @@ dependencies = [ [[package]] name = "lance-testing" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "arrow-array", "arrow-schema", @@ -6015,7 +6015,7 @@ dependencies = [ [[package]] name = "lance-tokenizer" version = "16.0.0-beta.5" -source = "git+https://github.com/lance-format/lance.git?tag=v16.0.0-beta.5#0ea718506941b3e4c8dd0aee279a8ea1b7c7b076" +source = "git+https://github.com/lance-format/lance.git?rev=83f649405efe897800b91b82561120a3961241f7#83f649405efe897800b91b82561120a3961241f7" dependencies = [ "frostem", "icu_segmenter", diff --git a/Cargo.toml b/Cargo.toml index b8a67273a..e0876b8fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,21 +19,21 @@ categories = ["database-implementations"] rust-version = "1.98.0" [workspace.dependencies] -lance = { "version" = "=16.0.0-beta.5", default-features = false, "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-core = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-datagen = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-file = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-io = { "version" = "=16.0.0-beta.5", default-features = false, "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-index = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-jsonb = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-linalg = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-namespace = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-namespace-impls = { "version" = "=16.0.0-beta.5", default-features = false, "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-table = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-testing = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-datafusion = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-encoding = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } -lance-arrow = { "version" = "=16.0.0-beta.5", "tag" = "v16.0.0-beta.5", "git" = "https://github.com/lance-format/lance.git" } +lance = { "version" = "=16.0.0-beta.5", default-features = false, "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-core = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-datagen = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-file = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-io = { "version" = "=16.0.0-beta.5", default-features = false, "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-index = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-jsonb = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-linalg = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-namespace = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-namespace-impls = { "version" = "=16.0.0-beta.5", default-features = false, "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-table = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-testing = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-datafusion = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-encoding = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } +lance-arrow = { "version" = "=16.0.0-beta.5", "rev" = "83f649405efe897800b91b82561120a3961241f7", "git" = "https://github.com/lance-format/lance.git" } lancedb = { path = "rust/lancedb", default-features = false } ahash = "0.8" anyhow = "1" diff --git a/python/python/tests/test_s3_bucket_dots.py b/python/python/tests/test_s3_bucket_dots.py index 146b8c3ad..ca27f6bbf 100644 --- a/python/python/tests/test_s3_bucket_dots.py +++ b/python/python/tests/test_s3_bucket_dots.py @@ -24,8 +24,16 @@ BUCKET_WITHOUT_DOTS = "s3://my-bucket/path" def assert_not_rejected_for_bucket_dots(connect): try: connect() - except ValueError as err: - assert "contains dots" not in str(err) + except (ValueError, RuntimeError) as err: + assert_not_bucket_dots_error(err) + + +def assert_not_bucket_dots_error(err): + message = str(err) + assert "contains dots" not in message + if isinstance(err, RuntimeError): + assert "Generic S3 error:" in message + assert "Failed to resolve region for bucket" in message class TestS3BucketWithDotsSync: @@ -66,20 +74,20 @@ class TestS3BucketWithDotsAsync: uri, opts = BUCKET_WITH_DOTS_AND_REGION try: await lancedb.connect_async(uri, storage_options=opts) - except ValueError as err: - assert "contains dots" not in str(err) + except (ValueError, RuntimeError) as err: + assert_not_bucket_dots_error(err) @pytest.mark.asyncio async def test_bucket_with_dots_and_aws_region_is_not_rejected(self): uri, opts = BUCKET_WITH_DOTS_AND_AWS_REGION try: await lancedb.connect_async(uri, storage_options=opts) - except ValueError as err: - assert "contains dots" not in str(err) + except (ValueError, RuntimeError) as err: + assert_not_bucket_dots_error(err) @pytest.mark.asyncio async def test_bucket_without_dots_is_not_rejected(self): try: await lancedb.connect_async(BUCKET_WITHOUT_DOTS) - except ValueError as err: - assert "contains dots" not in str(err) + except (ValueError, RuntimeError) as err: + assert_not_bucket_dots_error(err) diff --git a/rust/lancedb/src/table/computed_columns.rs b/rust/lancedb/src/table/computed_columns.rs index 108101b5b..f64fa4e09 100644 --- a/rust/lancedb/src/table/computed_columns.rs +++ b/rust/lancedb/src/table/computed_columns.rs @@ -5430,15 +5430,20 @@ mod tests { #[test] fn test_non_blob_input_does_not_require_json_round_trip() { - let json = lance_namespace::schema::arrow_schema_to_json(&ArrowSchema::new(vec![ - ArrowField::new("event_time", DataType::Time64(TimeUnit::Microsecond), false), - ])) - .unwrap(); + for (unit, expected) in [ + (TimeUnit::Microsecond, "time64:us"), + (TimeUnit::Nanosecond, "time64:ns"), + ] { + let json = lance_namespace::schema::arrow_schema_to_json(&ArrowSchema::new(vec![ + ArrowField::new("event_time", DataType::Time64(unit), false), + ])) + .unwrap(); - assert_eq!( - canonical_input_arrow_type(&json.fields[0]).unwrap(), - "time64" - ); + assert_eq!( + canonical_input_arrow_type(&json.fields[0]).unwrap(), + expected + ); + } } #[test]