Skip to content

feat: add framework of partitioned namespace#5638

Closed
wojiaodoubao wants to merge 2 commits into
lance-format:mainfrom
wojiaodoubao:partitioned-namespace
Closed

feat: add framework of partitioned namespace#5638
wojiaodoubao wants to merge 2 commits into
lance-format:mainfrom
wojiaodoubao:partitioned-namespace

Conversation

@wojiaodoubao

@wojiaodoubao wojiaodoubao commented Jan 6, 2026

Copy link
Copy Markdown
Contributor

Draft

This is based on lance-format/lance-namespace#279

Overview
PartitionedNamespace is an impl of LanceNamespace. It is a kind of DirectoryNamespace, containing a field member in type DirectoryNamespace.

Methods
There are 3 kinds of methods of PartitionedNamespace:

  • Read and Write (for Engine)
    • plan_scan
    • resolve_or_create_partition_table
    • commit
  • Partitioning
    • schema
    • tables
    • partitioning
    • update_partition_spec
    • add_column
    • drop_column
    • rename_column
    • type_promotion
  • Create Partitioned Namespace
    • create_partitioned_namespace

@wojiaodoubao wojiaodoubao marked this pull request as draft January 6, 2026 13:53
@github-actions github-actions Bot added the enhancement New feature or request label Jan 6, 2026
@wojiaodoubao wojiaodoubao force-pushed the partitioned-namespace branch from c62d87b to 8dce784 Compare January 6, 2026 13:55
@codecov

codecov Bot commented Jan 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 138 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance-namespace-impls/src/partition.rs 0.00% 138 Missing ⚠️

📢 Thoughts on this report? Let us know!

@wojiaodoubao wojiaodoubao force-pushed the partitioned-namespace branch from 8dce784 to 51ca004 Compare January 7, 2026 02:50
@wojiaodoubao

Copy link
Copy Markdown
Contributor Author

Hi @jackye1995 , I think may be we can push forward partitioning by first discussing the behavior of PartitionedNamespace, using this pr.

After the PartitionedNamespace design is done, we can split partitioning into more sub-tasks and start integrate engines.

Looking forward to your thoughts!

@jackye1995 jackye1995 self-requested a review January 7, 2026 07:40
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct JsonPartitionField {

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.

nit: since it's a part of the namespace spec, I think we can add this as a part of the OpenAPI definition, so it is codegened and has all the serde aspects handled automatically.

Comment thread rust/lance-namespace-impls/src/partition.rs
@xloya

xloya commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Draft

This is based on lance-format/lance-namespace#279

Overview PartitionedNamespace is an impl of LanceNamespace. It is a kind of DirectoryNamespace, containing a field member in type DirectoryNamespace.

Methods There are 3 kinds of methods of PartitionedNamespace:

  • Read and Write (for Engine)

    • plan_scan
    • resolve_or_create_partition_table
    • commit
  • Partitioning

    • schema
    • tables
    • partitioning
    • update_partition_spec
    • add_column
    • drop_column
    • rename_column
    • type_promotion
  • Create Partitioned Namespace

    • create_partitioned_namespace

Draft

This is based on lance-format/lance-namespace#279

Overview PartitionedNamespace is an impl of LanceNamespace. It is a kind of DirectoryNamespace, containing a field member in type DirectoryNamespace.

Methods There are 3 kinds of methods of PartitionedNamespace:

  • Read and Write (for Engine)

    • plan_scan
    • resolve_or_create_partition_table
    • commit
  • Partitioning

    • schema
    • tables
    • partitioning
    • update_partition_spec
    • add_column
    • drop_column
    • rename_column
    • type_promotion
  • Create Partitioned Namespace

    • create_partitioned_namespace

Hi, I've only recently come across this discussion. Currently, it seems that a partition table is defined as a special type of Directory Namespace. My question is whether partition tables can be extended to also be applicable to REST Namespace Impl, thus adapting to a wider range of scenarios?

My question stems from our scenario having a centralized metadata service, where we'd prefer to manage both non-partitioned and partitioned tables uniformly using REST Namespaces.

Looking forward to your reply, thanks!

@wojiaodoubao

Copy link
Copy Markdown
Contributor Author

My question stems from our scenario having a centralized metadata service, where we'd prefer to manage both non-partitioned and partitioned tables uniformly using REST Namespaces.

Hi @xloya , thanks your suggestion. One good feature of partitioned namespace is: it transforms a directory as a partitioned table. It means you can register a partitioned namespace uri to your centralized metadata service, just like normal lance table. Does is work for you?

@xloya

xloya commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

My question stems from our scenario having a centralized metadata service, where we'd prefer to manage both non-partitioned and partitioned tables uniformly using REST Namespaces.

Hi @xloya , thanks your suggestion. One good feature of partitioned namespace is: it transforms a directory as a partitioned table. It means you can register a partitioned namespace uri to your centralized metadata service, just like normal lance table. Does is work for you?

If the following alignment can be achieved during registration, I think it will meet our needs, such as lance_catalog.schema.non_partitioned_table and lance_catalog.schema.partitioned_namespace, where partitioned_namespace represents a partitioned lance table.

@wojiaodoubao

Copy link
Copy Markdown
Contributor Author

such as lance_catalog.schema.non_partitioned_table and lance_catalog.schema.partitioned_namespace, where partitioned_namespace represents a partitioned lance table.

Yes, partitioned namespace can work like this.

@wojiaodoubao wojiaodoubao force-pushed the partitioned-namespace branch from 51ca004 to 10b6751 Compare January 8, 2026 14:13
@github-actions github-actions Bot added A-python Python bindings A-java Java bindings + JNI labels Jan 8, 2026
@xloya

xloya commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

such as lance_catalog.schema.non_partitioned_table and lance_catalog.schema.partitioned_namespace, where partitioned_namespace represents a partitioned lance table.

Yes, partitioned namespace can work like this.

Cool! That's what we need, thanks!

@wojiaodoubao wojiaodoubao mentioned this pull request Jan 17, 2026
7 tasks
@github-actions github-actions Bot added the Stale label May 6, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution. This PR has been inactive for a while, so we're closing it to free up bandwidth. Feel free to reopen it if you still find it useful.

@github-actions github-actions Bot closed this May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-java Java bindings + JNI A-python Python bindings enhancement New feature or request Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants