chovy-3012 opened a new pull request, #13394:
URL: https://github.com/apache/seatunnel/pull/13394

   ### Purpose of this pull request
   
   Fixes #13262
   
   The existing `connector-lance` module only supports writing. This PR adds a 
Lance Source that reads the latest version of a dataset from the same locations 
the sink writes to (local filesystem or object storage such as S3/MinIO), one 
split per dataset fragment with checkpoint state, batch-only.
   
   - **Source implementation:** 6 new classes — `LanceSourceFactory` (option 
rule, notBlank validation), `LanceSourceReader` (fragment scan → rows), 
`LanceSourceSplitEnumerator` (split = fragment, restore state on checkpoint), 
`LanceSource`, `LanceSourceSplit`, `LanceSourceState`
   - **Row conversion:** `ArrowRowConverter` maps Arrow vectors to 
`SeaTunnelRow` — scalars 1:1, list → `ARRAY` (child field inferred), binary → 
`bytes`; unsupported types (vector/`FixedSizeBinary`, struct, map) fail fast 
and name the offending column (`COMMON-07`)
   - **Config:** 7 options in `LanceSourceOptions`, including 
`lance.read.storage.options`, so S3/MinIO credentials come from job config
   - Docs: new EN/ZH `source/Lance.md` pages state the v1 limitations (latest 
version only, no column projection, no filter pushdown — left as follow-ups)
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Adds a new Lance Source connector; the existing sink is untouched — no 
option keys, defaults, or public APIs modified. No new dependencies.
   
   ### How was this patch tested?
   
   ```bash
   # Unit tests (66/66 pass, includes new LanceFactoryTest + 
ArrowRowConverterTest)
   ./mvnw test -pl :connector-lance
   
   # E2E tests
   ./mvnw -DskipUT -DskipIT=false verify -pl :connector-lance-e2e
   ```
   
   `LanceIT.testLanceSourceReadback` writes 100 rows through the sink, reads 
them back through the source, and asserts the row count via the Assert sink. 
Also verified end-to-end on a MinIO backend with a 18-case parameter matrix 
covering all 7 options, credential behavior, parallel fragment reads, and 
fail-fast type rejection.
   
   ### Check list
   
   * [x] If any new Jar binary package adding in your PR, please add License 
Notice according [New License 
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
 — n/a, no new binary package
   * [x] If necessary, please update the documentation to describe the new 
feature. https://github.com/apache/seatunnel/tree/dev/docs — EN/ZH 
`source/Lance.md` added
   * [x] If necessary, please update `incompatible-changes.md` to describe the 
incompatibility caused by this PR. — n/a, new connector
   * [x] If you are contributing the connector code, please check that the 
following files are updated:
     1. Update 
[plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties)
 and add new connector information in it — added `seatunnel.source.Lance = 
connector-lance`
     2. Update the pom file of 
[seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
 — n/a, `connector-lance` already packaged
     3. Add ci label in 
[label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
 — n/a, no `lance` label exists for the connector (labeler is metadata-only; 
recent connector PRs #13088/#13094 did not add one either)
     4. Add e2e testcase in 
[seatunnel-e2e](https://github.com/apache/seatunnel/blob/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
 — extended `LanceIT`
     5. Update connector 
[plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
 — n/a, `connector-lance` already listed
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to