Repository navigation
[VL] Add Velox offload for Lance scans via Arrow C stream - #12958
Conversation
|
Run Gluten Clickhouse CI on x86 |
|
Run Gluten Clickhouse CI on x86 |
|
@sezruby the coding style issue can be fixed by running this tool: |
0a7569f to
5080d2f
Compare
|
Thanks @zhouyuan! Ran Heads up on the rest of CI: this is still a draft because the lance-spark release carrying lance-format/lance-spark#778 isn't out yet, so the |
|
Run Gluten Clickhouse CI on x86 |
|
just link, no followup needed This is the scan-side version of the same problem. With the Spark changes proposed in #13140, a connector-specific scan wouldn't be needed:
|
5080d2f to
5b47a2b
Compare
|
Run Gluten Clickhouse CI on x86 |
5b47a2b to
10d5502
Compare
|
Run Gluten Clickhouse CI on x86 |
| TAGS_EXCLUDE="org.apache.spark.tags.ExtendedSQLTest,org.apache.spark.tags.SlowHiveTest,org.apache.gluten.tags.UDFTest,org.apache.gluten.tags.EnhancedFeaturesTest,org.apache.gluten.tags.CudfTest,org.apache.gluten.tags.SkipTest" | ||
| if [ "${{ matrix.group }}" = "1" ]; then | ||
| $MVN_CMD clean test -Pspark-3.5 -Pjava-17 -Pbackends-velox -Piceberg -Pdelta -Phudi -Ppaimon -Pspark-ut \ | ||
| $MVN_CMD clean test -Pspark-3.5 -Pjava-17 -Pbackends-velox -Piceberg -Pdelta -Phudi -Ppaimon -Plance -Plance-test -Pspark-ut \ |
There was a problem hiding this comment.
could also enable the 4.0 test for lance if it's available?
There was a problem hiding this comment.
Thanks! lance-spark 0.8.0 publishes lance-spark-4.0_2.13, so I enabled -Plance -Plance-test in the Spark 4.0 job (group 1, which runs org.apache.gluten.*). VeloxLanceSuite passes 5/5 locally on Spark 3.5 and 4.0. I also pinned spark.sql.ansi.enabled=false in the suite, since Spark 4 defaults to ANSI. Docs updated.
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
4 open findings
Resource cleanup is not exception-safe during fragment initialization: ifwrap(...)or… · New Each fragment’sreader/handleis only closed on task completion. If a Spark partition contains… · New The parent POM profile adds extra source/resource roots for every module when-Planceis enabled.… · New This reads like a placeholder and doesn’t add information. Consider turning it into a proper… · New
What changed in this PR
Adds Velox-side offload support for read-only Lance BatchScanExec by importing Lance-exported Arrow C streams into Gluten’s Arrow-Java columnar batches, with opt-in build/test profiles and CI validation.
Changes:
- Introduces a new Velox “lance” component + rule to rewrite exportable Lance scans to
LanceScanTransformer. - Implements
LanceScanTransformerthat imports per-fragment Arrow C streams and emitsArrowJavaBatchTypecolumnar batches. - Adds Maven profiles, documentation, CI wiring, and a new
VeloxLanceSuitecovering offload vs fallback cases.
| File | Description |
|---|---|
| pom.xml | Adds lance / lance-test profiles to include Lance-specific sources/resources. |
| backends-velox/pom.xml | Adds Lance dependencies (provided/test) with Arrow/Jackson exclusions and Arrow dataset API. |
| backends-velox/src-lance/main/.../OffloadLanceScan.scala | Adds heuristic rule to rewrite exportable Lance scans to LanceScanTransformer. |
| backends-velox/src-lance/main/.../LanceScanTransformer.scala | Implements Arrow C stream import path into Arrow-Java columnar batches. |
| backends-velox/src-lance/main/.../VeloxLanceComponent.scala | Registers the Lance offload component, gated by runtime class presence. |
| backends-velox/src-lance/test/.../VeloxLanceSuite.scala | Adds execution-plan and correctness tests for offload/fallback behavior. |
| docs/get-started/VeloxLance.md | Documents requirements, build flags, behavior, and limitations. |
| .github/workflows/velox_backend_x86.yml | Enables Lance profiles in CI group 1 so new suite runs. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| val stream = ArrowArrayStream.wrap(handle.streamAddress()) | ||
| val reader = Data.importArrayStream(allocator, stream) | ||
| context.addTaskCompletionListener[Unit] { | ||
| _ => | ||
| try { | ||
| // Drains + runs the C release callback, tearing down the native scan. | ||
| reader.close() | ||
| } finally { | ||
| // Frees the caller-owned stream struct and closes the scanner + dataset. | ||
| handle.close() | ||
| } |
There was a problem hiding this comment.
Fixed in d017739. Per-fragment reading is now in LanceFragmentIterator. If wrap/importArrayStream throws, the handle is closed before rethrowing, and any close failure is added as suppressed.
| val handle = LanceArrowStreamScanner.export(fragId.intValue(), lancePartition) | ||
| val stream = ArrowArrayStream.wrap(handle.streamAddress()) | ||
| val reader = Data.importArrayStream(allocator, stream) | ||
| context.addTaskCompletionListener[Unit] { | ||
| _ => | ||
| try { | ||
| // Drains + runs the C release callback, tearing down the native scan. | ||
| reader.close() | ||
| } finally { | ||
| // Frees the caller-owned stream struct and closes the scanner + dataset. | ||
| handle.close() | ||
| } | ||
| } | ||
|
|
||
| new Iterator[ColumnarBatch] { | ||
| private var advanced = false | ||
| private var hasMore = false | ||
|
|
||
| private def advance(): Unit = | ||
| if (!advanced) { | ||
| hasMore = reader.loadNextBatch() | ||
| advanced = true | ||
| } | ||
|
|
||
| override def hasNext: Boolean = { | ||
| advance() | ||
| hasMore | ||
| } |
There was a problem hiding this comment.
Done in d017739. Reader + handle are closed as soon as loadNextBatch() returns false, so a multi-fragment partition holds at most one open scan. close() is idempotent, and the task-completion listener stays as a safety net for early termination. Emitted batches own their transferred buffers, so closing early doesn't affect them. Added a multi-fragment test (including a LIMIT query that stops early and relies on the listener).
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>build-helper-maven-plugin</artifactId> | ||
| <executions> | ||
| <execution> | ||
| <id>add-lance-sources</id> | ||
| <goals> | ||
| <goal>add-source</goal> | ||
| </goals> | ||
| <phase>generate-sources</phase> | ||
| <configuration> | ||
| <sources> | ||
| <source>${project.basedir}/src-lance/main/scala</source> | ||
| </sources> | ||
| </configuration> | ||
| </execution> | ||
| <execution> | ||
| <id>add-lance-resources</id> | ||
| <goals> | ||
| <goal>add-resource</goal> | ||
| </goals> | ||
| <phase>generate-resources</phase> | ||
| <configuration> | ||
| <resources> | ||
| <resource> | ||
| <directory>${project.basedir}/src-lance/main/resources</directory> | ||
| </resource> | ||
| </resources> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </profile> | ||
| <profile> | ||
| <id>lance-test</id> | ||
| <activation> | ||
| <activeByDefault>false</activeByDefault> | ||
| </activation> | ||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>build-helper-maven-plugin</artifactId> | ||
| <executions> | ||
| <execution> | ||
| <id>add-lance-test-sources</id> | ||
| <goals> | ||
| <goal>add-test-source</goal> | ||
| </goals> | ||
| <phase>generate-test-sources</phase> | ||
| <configuration> | ||
| <sources> | ||
| <source>${project.basedir}/src-lance/test/scala</source> | ||
| </sources> | ||
| </configuration> | ||
| </execution> | ||
| <execution> | ||
| <id>add-lance-test-resources</id> | ||
| <goals> | ||
| <goal>add-test-resource</goal> | ||
| </goals> | ||
| <phase>generate-test-resources</phase> | ||
| <configuration> | ||
| <resources> | ||
| <resource> | ||
| <directory>${project.basedir}/src-lance/test/resources</directory> | ||
| </resource> | ||
| </resources> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> |
There was a problem hiding this comment.
This is intentional and mirrors the existing delta/iceberg/hudi/paimon profiles in the root pom, which add src-<format> roots the same way. build-helper skips non-existent directories, so other modules are unaffected.
|
|
||
| ## Reading | ||
|
|
||
| Offload / Fallback. |
10d5502 to
d017739
Compare
|
Run Gluten Clickhouse CI on x86 |
Offloads read-only Lance BatchScanExec to the Velox backend through the Arrow C Data Interface, using lance-spark's LanceArrowStreamScanner (lance-spark#778). Only the Arrow C-struct address crosses the classloader boundary, so Gluten's Arrow version stays decoupled from lance-spark's. The offload is gated on being a plain columnar Lance scan (no pushed aggregation, no full-text query); anything else falls back to vanilla Spark. A velox-lance Component registers the rule and only engages when lance-spark is on the classpath. Code lives under backends-velox/src-lance behind a new `lance` Maven profile, mirroring the src-iceberg velox-integration layout. The read path is entirely velox-specific (ArrowWritableColumnVector, ArrowBufferAllocators, ValidatablePlan), so no top-level gluten-lance module is added yet; one can be introduced when an engine-agnostic write path lands. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Supportability follow-ups to the Lance Velox offload: - lance-test profile (root pom): add-test-source/add-test-resource for backends-velox/src-lance/test, activated alongside -Plance. - VeloxLanceSuite: asserts a columnar Lance scan offloads to LanceScanTransformer, that projection + pushed filter stay offloaded with correct results, and that a pushed-down aggregation falls back to a vanilla BatchScanExec. API-grounded against VeloxWholeStageTransformerSuite (checkGlutenPlan/checkSparkPlan/runQueryAndCompare, Iceberg-suite parity). - docs/get-started/VeloxLance.md: read-only scope, -Plance build, lance-spark version + linux-x86-64 platform requirements, offload/fallback conditions, and the Arrow C stream topology note. The suite requires the lance-spark native runtime, published for linux-x86-64 only, so it executes in that environment; the offload/fallback behavior it encodes was validated under linux-x86-64. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Ran ./dev/format-scala-code.sh (spotless:apply) so the Lance offload sources conform to Gluten's scalafmt config -- wraps javadoc lines over the 100-column limit and drops a stray import-group blank line. spotless:check is now clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Pin lance.version to the released lance-spark 0.8.0 (first release with
LanceArrowStreamScanner) in the root pom.
- lance-test: add the Spark-version-specific lance-spark artifact, which
registers the "lance" data source used by the suite.
- Keep Gluten's Arrow on the classpath: exclude lance-core's newer Arrow and
jackson-jaxrs, and add arrow-dataset at ${arrow.version}.
- Fix an executor-side NPE: LanceScanTransformer.output was read through the
transient batchScan after serialization (e.g. by DeserializeToObjectExec on
collect()); capture it eagerly.
- Enable -Plance -Plance-test in the Spark 3.5 x86 CI job.
- Docs: lance-spark 0.8.0 requirement, supported native platforms, test command.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Plain scan: the Lance scan's Arrow Java batches go straight to vanilla ColumnarToRowExec (no Velox round trip). - New test: with a Velox consumer (grouped aggregation), the scan feeds ArrowColumnarToVeloxColumnarExec(OffloadArrowDataExec(scan)) and is never converted to rows first. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ark 4.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
d017739 to
0f9b38a
Compare
|
Run Gluten Clickhouse CI on x86 |
|
For the record: longer term, Gluten should reuse lance-spark's own columnar scan, with at most a thin Proposal. lance-spark keeps the standard Three pieces are needed: 1. lance-spark: an Arrow output mode in the columnar reader Today
An Arrow mode would:
2. lance-spark: solve the Arrow version/classloader mismatch on its side This mismatch is why this PR passes a C-struct address. If lance-spark's batches carry lance's own (newer or relocated) Arrow classes, Gluten can't use them as Arrow. Two options:
The first is cleaner and matches apache/spark#59313. 3. Gluten: declare the batch type and accept Spark's
With these in place, the plan becomes |
|
@FelixYBW following up on your plan above (#12958 (comment)):
Gluten issues found on this path:
Questions:
#13488 stays the short-term vector fix for 1.8 until then. |
Since the Lance scan offload was added in apache#12958, isExportable has only rejected a pushed aggregation and a full-text query. Other scans that the Arrow C stream cannot serve are offloaded and then fail on their first batch (apache#13487). apache#13488 makes vector columns readable; this covers the rest. isExportable now also checks the scan's columns at plan time, following what LanceArrowStreamScanner.export and LanceFragmentScanner do: - Columns that lance-spark's own reader fixes up after the native scan fall back. Blob (v1 and v2) and JSON columns come back in their stored form. The _rowid, _rowaddr, _fragid, row-version, _score and blob position and size columns are left out of the native projection. - A scan that reads no columns falls back: the native scan returns _rowid instead. - Every other column is mapped to Arrow with lance-spark's LanceArrowUtils, the mapping the export enforces, with vectors rewritten as lists as the scan emits them. An empty vector of that type is wrapped in ArrowColumnVector, as the scan will. FixedSizeBinary, Date(MILLISECOND) and Float16 vector columns fall back this way. Other vector columns stay offloaded. With lance-spark 0.8.0, unsigned integer, LargeList, time and non-microsecond timestamp columns still fail at execution: its Spark schema does not record these Arrow types, so they cannot be told apart at plan time.
## What Adds an `arrow_batch_reads` read option that makes the columnar reader emit Arrow batches: every column of a batch is a Spark `ArrowColumnVector`, in the read schema's order. `LanceScan.arrowBatchSchema()` tells at planning time whether a scan can emit them and with which Arrow types, and `LanceScan.withArrowBatches()` turns them on for a planned scan. ## Why An engine that processes Arrow data can then take Lance batches as Arrow from Spark's standard `BatchScanExec` → `DataSourceRDD` path. Apache Gluten currently reads Lance through its own scan node over `LanceArrowStreamScanner.export` (apache/gluten#12958), which skips lance-spark's custom metrics and the scan's output partitioning, and fails at runtime on scans `export` rejects (apache/gluten#13487). With Arrow batches, the Lance-specific code left in Gluten is a rule that marks such a scan's batches as Arrow (outlined in apache/gluten#12958 (comment)). ## How - **Arrow C stream import in lance-spark.** With Arrow batch reads, `LanceFragmentColumnarBatchScanner` imports the fragment scan's Arrow C stream itself (`exportArrowStream` + `Data.importArrayStream`) instead of reading it through lance-core's reader, so only the C-struct address crosses from lance-core and the vectors use the Arrow classes lance-spark runs with. The batches are allocated from `LanceRuntime.arrowBatchAllocator()`, a process-wide child of Spark's root allocator (`ArrowUtils.rootAllocator()`) that is capped at `LANCE_ALLOCATOR_SIZE` and never closed. A consumer whose allocator is under that root moves them without copying and can keep them after the reader closes; their memory, including the imported C structs, is released with the last reference to it. - **Columns.** Most columns are the native scan's vectors as they are. Columns Spark's `ArrowColumnVector` does not read as declared are rebuilt without copying values: - `FixedSizeList` vectors become `List`s over the same child values, also inside structs, lists, and maps. Only an offsets buffer is new: element `i` of a FixedSizeList of size `n` is child range `[i * n, (i + 1) * n)`, also for null entries. - `_rowid`, `_rowaddr`, and the row version columns, unsigned 64-bit natively, become signed 64-bit integers over the same buffers, as the Spark reader reads them. - `_fragid` is a filled 32-bit integer vector. - **Planning.** `LanceScanBuilder` plans the Arrow batches from the dataset schema it already loads (`ArrowBatchAdapter.plan`). For each column it builds an empty vector of the batch's Arrow type and checks that Spark's `ArrowColumnVector` reads it as the declared Spark type, with struct fields in the same order. This follows whatever the running Spark version supports and allocates nothing. Blob columns, also a blob nested in a struct or list (which Lance reads as its descriptor), JSON columns (converted on the JVM), the full-text `_score`, and other types (unsigned integers, `FixedSizeBinary`, non-microsecond timestamps, ...) make the scan read as usual, also when the option asks for Arrow batches. A pushed aggregation has no Arrow batches. A `LanceScan` without a supported plan, such as one built through the constructor without one, reads as usual whatever its read options say. Each built column is checked again against the declared type at runtime. Planning adds a `dataset.getSchema()` call to `LanceScanBuilder.build()` and runs also when the option is off, so `arrowBatchSchema()` is available to consumers. - **Batch lifetime.** A batch is valid until the reader's next `next()` or `close()` call: the vectors the reader builds for a batch are released when the next batch is loaded, and the root's vectors are reused. A consumer that keeps a batch longer transfers its vectors. - The option is copied by `withRef` (through a new `LanceSparkReadOptions.toBuilder()`) and included in `equals` / `hashCode`, so scans with and without Arrow batches are not reused for each other. `withArrowBatches()` keeps the planned partitioning. The existing public `LanceScan` constructor is kept. Documented in `docs/src/config.md`. ## Testing - `ArrowBatchAdapterTest` (8 tests): planning keeps plain columns, turns vectors into Lists at any depth, maps metadata columns to signed integers, handles an empty projection, and rejects unsigned, `FixedSizeBinary`, nanosecond timestamps, structs whose fields do not line up (either way), blob, JSON, `_score`, and missing columns. - `BaseArrowBatchReadTest` (12 tests, per Spark version through `ArrowBatchReadTest`): each test compares rows with and without Arrow batches and checks the batches through the scan's columnar reader: vector, struct, list and map columns with nulls; metadata columns; int8 vectors and vectors of vectors; scans without an Arrow batch form reading as usual, including columns with a blob nested in a struct or a list of structs and scans built without a supported plan; struct fields; `withArrowBatches()` on a planned scan, keeping its partitioning; and many fragments read in several batches, where the previous batch's vectors are released when the next one is loaded and the Arrow batch allocator returns to its starting level. Every Arrow batch vector is checked to come from the Arrow batch allocator, under Spark's root allocator, whose limit is the Lance allocator's, and a consumer that transfers vectors of a batch (a native one and one the reader built) into its own allocator keeps them readable after the reader closes, with Spark's root returning to its starting level once it closes them. - `BlobUtilsTest`: `isLanceBlobArrowField` matches lance-core's `Field::is_blob`. - The new tests pass on Spark 3.4/Scala 2.12, 3.5/2.12, 4.0/2.13, and 4.1/2.13; the full Spark 3.5/2.12 suite passes (1711 tests, 0 failures); `spotless:check` is clean. With `LANCE_ALLOCATOR_SIZE` set below a batch's size, Arrow batch reads fail on the cap like the regular reader. - End to end with a Gluten build that, instead of its own Lance scan, turns on Arrow batches for scans whose Arrow types Velox reads and marks their batches as Arrow: on 52 Arrow types written with pylance 12.0.0, the five metadata columns, and an empty projection, every query matches vanilla Spark except one, and scans with an Arrow batch form feed Velox directly through `BatchScanExec`. The exception is a column of Arrow `Null` type, which fails in Gluten when it adopts the batch (`NullVector` has no allocator); that is a Gluten-side fix. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
@FelixYBW an update on the Arrow-batch path, with measurements.
I measured this with the 2026-11-08 nightly (
Without pruning, the Arrow-batch path is up to 21% slower here because of the copy in The Gluten side in this run is the prototype from my last comment: a Is your allocator change planned for main? With it, this path wouldn't need the copy. |
|
@FelixYBW a follow-up on the copy in lance-spark allocates those batches under Spark's root allocator. lance-format/lance-spark#908 settled on that in review, so that consumers under Spark's root can transfer the vectors and keep them after the reader closes. Gluten's task allocator is its own The "Ongoing work" section of Reserving the moved bytes on the target listener in So nothing should be transferred at all. Instead, lance-spark imports its Arrow batches into an allocator Gluten supplies for the task, and every allocation and release goes through Gluten's listener:
Validated on amd64 Linux against a local build of lance-format/lance-spark#966:
One caveat before Gluten enables it: Gluten's task allocator throws when Spark has no memory left, so with this change a refusal can come inside Arrow Java's C Data import. Arrow Java leaks the batch being imported when that happens while importing its buffers or while allocating the struct the batch moves into. The first is apache/arrow-java#1239, fixed on main after 19.0.0. The second is apache/arrow-java#1491, with a fix in apache/arrow-java#1492. lance-format/lance-spark#966 releases everything before that point:
Gluten's Arrow Java has both leaks: the 15.0.0 source build and the 18.x / 19.0 artifacts used for Spark 4.x. The copy path in #13648 doesn't hit them, because lance-spark imports into its own allocator, which never refuses. So the plan:
Does this fit what you have in mind for the allocator? Edited: I first proposed the reservation in |



What changes are proposed in this pull request?
Offloads read-only Lance
BatchScanExecto the Velox backend through the Arrow C Data Interface. This is the Gluten consumer side of the three-step Lance integration; both upstream pieces are released:LanceScanner#exportArrowStream(long)in lance-core (Arrow C stream export)LanceArrowStreamScannerforwarding in lance-spark (feat(gluten): export a Lance fragment scan as an Arrow C stream lance-format/lance-spark#778), first released in lance-spark 0.8.0How it works
OffloadLanceScanrule matches a LanceBatchScanExecand rewrites it toLanceScanTransformer, which produces anArrowJavaBatchTypecolumnar RDD.LanceArrowStreamScanner.export(...)hands back an Arrow C stream; Gluten wraps the stream address withArrowArrayStream.wrap(...)/Data.importArrayStream(...)and loads the batches intoArrowWritableColumnVector. Only the Arrow C-struct address crosses the classloader boundary, so Gluten's Arrow version stays decoupled from lance-spark's.velox-lanceComponentregisters the rule and activates only when lance-spark is on the classpath (org.lance.spark.read.LanceScanpresent).Relationship to the Iceberg scan transformer
LanceScanTransformeris intentionally different in shape fromIcebergScanTransformer. Iceberg extendsBatchScanExecTransformerBaseand is a native Velox scan: it emits Substrait, pushes filters into Velox, and reports scan-level SQL metrics. Lance instead extendsLeafExecNode with ValidatablePlanand bridges an already-produced Arrow stream into Velox: filters and projection are pushed into the Lance reader by lance-spark before export, not into Velox, and there is an Arrow-Java → Velox conversion at import. Consequences of this boundary:_rowid/_rowaddr/ blob columns) are not offloaded.These are follow-up opportunities, not blockers for the read-only offload. (See also #13140 for the more general "Spark Arrow batch → Velox" direction.)
Where the code lives / build
The read path is entirely Velox-specific (
ArrowWritableColumnVector,ArrowBufferAllocators,ValidatablePlan), so it is placed underbackends-velox/src-lancebehind a newlanceMaven profile — mirroring thesrc-icebergVelox-integration layout rather than adding a top-level module.lance.version(rootpom.xml) =0.8.0.-Plance: compiles againstlance-spark-base(provided). lance-core declares a newer Arrow than Gluten, so lance's transitive Arrow / jackson-jaxrs are excluded and Gluten's Arrow is kept (arrow-datasetis added at${arrow.version}). This matches the publishedlance-spark-bundle-3.5, which ships Arrow 15. With these exclusions-Planceonly adds jars to the classpath; it does not change any existing dependency version.-Plance-test: adds the Spark-version-specificlance-spark-${sparkbundle.version}runtime (registers thelancedata source) and the test sources.Build:
-Pbackends-velox -Pspark-3.5 -Plance.docs/get-started/VeloxLance.mddocuments scope, build, and requirements.Open question for reviewers: a top-level
gluten-lancemodule (likegluten-iceberg) makes sense once there is engine-agnostic code to host — e.g. a write path. The read-only offload has none today, so this PR keeps it Velox-local. Happy to restructure if you'd prefer the module up front.How was this patch tested?
VeloxLanceSuite(-Plance -Plance-test) asserts:LanceScanTransformer; with no Velox consumer its Arrow batches go straight to vanillaColumnarToRowExec(no Velox round trip),ArrowColumnarToVeloxColumnarExec(OffloadArrowDataExec(scan))into a Velox aggregate, with no row conversion off the scan,LIMITthat stops early (native scans are released per fragment on exhaustion, with a task-completion listener as the safety net),BatchScanExec.CI: the Spark 3.5 and Spark 4.0 x86 jobs (group 1, which runs the
org.apache.glutensuites) now build with-Plance -Plance-test, so the suite runs on every PR. The suite setsspark.sql.ansi.enabled=falsebecause Spark 4 defaults to ANSI mode.Locally, the suite passes (5/5) on linux-aarch64 (
apache/gluten:centos-8-jdk8, JDK 17, Spark 3.5 and Spark 4.0 / Scala 2.13) against lance-spark 0.8.0 and the current nightly Velox native libs:Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code; GitHub Copilot CLI 1.0.93 (Claude Opus 5.5)
Relates to #12263.