Skip to content

[WIP]Support Lance Connector#74690

Open
caneGuy wants to merge 2 commits into
StarRocks:sr-lance-devfrom
caneGuy:sr-lance-dev
Open

[WIP]Support Lance Connector#74690
caneGuy wants to merge 2 commits into
StarRocks:sr-lance-devfrom
caneGuy:sr-lance-dev

Conversation

@caneGuy

@caneGuy caneGuy commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Why I'm doing:

What I'm doing:

Fixes #issue

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
    • This pr needs auto generate documentation
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 4.1
    • 4.0
    • 3.5

caneGuy and others added 2 commits June 10, 2026 17:49
Port the Lance integration from the supportAiTable branch onto main and
rename the former "AI table" surface to Lance:

- LanceTable catalog type + LanceTableFactory, exposed as ENGINE=LANCE
- lance-reader JNI extension (lance-core 0.31.0, Arrow -> SR type mapping)
- LanceScanNode + Logical/PhysicalLanceScanOperator; column prune,
  predicate push down, and KNN vector-search push down
  (cosine_similarity / l2_distance) via the vector rewrite rule set
- BE LanceTableDescriptor + create_lance_jni_scanner
- thrift TLanceTable / TLanceQuery and THdfsScanRange lance fields

Storage credentials/endpoint are sourced from table PROPERTIES
(aws.s3.access_key / secret_key / endpoint, plus lance.option.* passthrough)
and plumbed FE -> THdfsScanRange.lance_storage_options -> JNI scanner.
No credentials are hardcoded anywhere.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Enable `CREATE EXTERNAL CATALOG x PROPERTIES("type"="lance", ...)` on top of
the existing ENGINE=LANCE table support, so Lance datasets can be queried via
a catalog instead of declaring each table by hand.

- LanceConnector / LanceMetadata implementing Connector / ConnectorMetadata
- Register "lance" in ConnectorType (enum + SUPPORT_TYPE_SET); CatalogAnalyzer
  validates it automatically
- LanceMetadata.getTable derives the dataset uri from
  lance.catalog.warehouse/<db>/<table>.lance, opens the dataset to infer the
  schema (Arrow -> StarRocks type mapping, FixedSizeList<float> -> ARRAY<FLOAT>
  for vector columns), and returns a LanceTable carrying catalog/db identity
- Storage credentials/endpoint flow from the catalog PROPERTIES into each
  table's properties (aws.s3.* / lance.option.*) and reuse the existing scan
  path; no credentials are hardcoded
- Scan planning, column prune, predicate and KNN push down are reused unchanged

Note: listDbNames/listTableNames are not implemented (Lance has no central
namespace to enumerate); query a known db.table directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


caneGuy seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@caneGuy caneGuy changed the title [WIP]Support Lance [WIP]Support Lance Connector Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants