Skip to content

[GLUTEN-13806][VL] Move Lance's backend-independent code to a gluten-lance module - #13732

Merged
zhouyuan merged 2 commits into
apache:mainfrom
malinjawi:feat/lance-module
Nov 26, 2026
Merged

zhouyuan merged 2 commits into
apache:mainfrom
malinjawi:feat/lance-module

Conversation

@malinjawi

@malinjawi malinjawi commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

Split out from #13595 to make it easier to review.

This adds a gluten-lance module for the Lance code that doesn't depend on Velox, like gluten-iceberg. For now it only holds the scan and its offload rule, moved as is. The build, CI and scripts know about the new module, and the Spark 4.1 and 4.2 jobs now run the Lance tests too. No behaviour change.

How was this patch tested?

Ran the existing Lance scan tests locally on Spark 3.5, 4.0, 4.1 and 4.2.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (claude-opus-5-5)

Related issue: #13806

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The change still leaves an outdated developer-guide module reference and documents a Lance test command that bypasses the repository’s required Maven wrapper.

2 open issues
What changed in this PR

This pull request extracts Lance scan and offload logic that does not depend on Velox into a new gluten-lance module, while retaining Velox-specific integration and tests in backends-velox.

Changes:

  • Added the gluten-lance module with Lance scan transformation and offload logic.
  • Updated Maven profiles, packaging, dependencies, developer scripts, and CI configuration.
  • Enabled Lance coverage in Spark 4.1 and 4.2 Velox jobs and updated documentation.
File Description
pom.xml Registers gluten-lance under the Lance Maven profile.
package/​pom.xml Adds the Lance module to packaged dependencies.
gluten-lance/​src/​main/​scala/​org/​apache/​gluten/​extension/​OffloadLanceScan.scala Defines the backend-independent Lance scan offload rule.
gluten-lance/​src/​main/​scala/​org/​apache/​gluten/​execution/​LanceScanTransformer.scala Provides Lance Arrow C-stream scanning and vector conversion logic.
gluten-lance/​pom.xml Defines dependencies and build configuration for the new module.
docs/​backends/​velox/​get-started/​VeloxLance.md Documents the split between backend-independent Lance code and Velox integration.
dev/​run-scala-test.sh Adds the new module to Scala test module discovery.
dev/​format-scala-code.sh Includes the Lance profile in Scala formatting checks.
dev/​bloop-test.sh Adds the new module to Bloop test discovery.
backends-velox/​pom.xml Makes the Velox backend depend on gluten-lance under the Lance profile.
.github/​workflows/​velox_backend_x86.yml Updates module path detection and enables Lance tests for Spark 4.1 and 4.2.
.github/​workflows/​velox_backend_arm.yml Updates Lance module path detection for ARM CI.
.github/​workflows/​scala_code_format.yml Triggers formatting checks for changes in gluten-lance.
.github/​labeler.yml Classifies gluten-lance changes as data-lake work.

Review effort: Lite

Comment on lines +36 to +38
As for Iceberg, the code is split in two. The `gluten-lance` module holds the parts that do not
depend on Velox, such as the scan and its offload rule. `backends-velox/src-lance` registers them
with the Velox backend and holds the tests that run them on Velox. Add `-Plance-test` to also

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 6cb0e34: the developer guide now lists the scan under gluten-lance and says the lance profile builds that module.


```
mvn test -pl backends-velox -Pbackends-velox -Pspark-3.5 -Plance -Plance-test \
mvn test -pl gluten-lance,backends-velox -am -Pbackends-velox -Pspark-3.5 -Plance -Plance-test \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 6cb0e34, it uses ./build/mvn now.

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

As zhouyuan suggested on apache#13595, and as gluten-iceberg does, the Lance
scan transformer and its offload rule move from backends-velox/src-lance
to a new gluten-lance module. backends-velox/src-lance keeps the
component that registers them with Velox and the tests. Nothing else
changes.

The lance profile builds the module, backends-velox and the bundle depend
on it, and the CI path filters, labeler and test scripts list it. The
Scala formatter now includes the lance profile, so Lance code is
format-checked in CI, and the Spark 4.1 and 4.2 jobs run the Lance tests
like 3.5 and 4.0 do.

This is the first part of splitting apache#13595.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@malinjawi

Copy link
Copy Markdown
Contributor Author

cc @LuciferYang @sezruby could you take a look when you have time? Thanks!

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

The read-only offload is entirely Velox-specific, so it lives under `backends-velox/src-lance`
(mirroring `backends-velox/src-iceberg`) rather than in a top-level module. Add `-Plance-test` to
also compile and run the Lance test suite:
As for Iceberg, the code is split in two. The `gluten-lance` module holds the parts that do not

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iceberg seems not related, a copy paste error?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! Yeah that was a typo from my end. Cleaned up the sentence now. Thanks!

The developer guide still listed the Lance scan under
backends-velox/src-lance, and the test command used bare mvn instead of
the ./build/mvn wrapper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@malinjawi malinjawi mentioned this pull request Nov 26, 2026
13 tasks
@malinjawi malinjawi changed the title [GLUTEN-12263][VL] Move Lance's backend-independent code to a gluten-lance module [GLUTEN-13806][VL] Move Lance's backend-independent code to a gluten-lance module Nov 26, 2026
@zhouyuan
zhouyuan merged commit f355b22 into apache:main Nov 26, 2026
44 of 45 checks passed
@prestodb-ci

prestodb-ci commented Nov 26, 2026 •

Copy link
Copy Markdown

Rebase job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants