Skip to content

Commit 1915a12

Browse files
feat: add lance partitioning spec (#279)
This pr tries to add partition as an experimental spec. Discussion could be fount at: #272 This PR remains a draft, and we still need to hold a vote to decide whether to introduce the partition spec. --------- Co-authored-by: Jack Ye <yezhaoqin@gmail.com>
1 parent f6134f7 commit 1915a12

5 files changed

Lines changed: 624 additions & 2 deletions

File tree

docs/src/.pages

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ nav:
44
- Directory Namespace: dir
55
- REST Namespace: rest
66
- Catalog Integrations: integrations
7+
- Partitioning Spec: partitioning-spec.md

docs/src/dir/.pages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
nav:
22
- Catalog Spec: catalog-spec.md
3-
- Implementation Spec: impl-spec.md
3+
- Implementation Spec: impl-spec.md

docs/src/dir/catalog-spec.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ The `__manifest` table has the following schema:
105105
| `metadata` | String (nullable) | JSON-encoded metadata/properties (only for namespaces) |
106106
| `base_objects` | List<String> (nullable) | Reserved for future use (e.g., view dependencies) |
107107

108+
**Schema Extensibility**: The `__manifest` table schema may include additional columns beyond those listed above. Extensions like [partitioned namespaces](../partitioning-spec.md) add columns for efficient filtering. Implementations should preserve unrecognized columns during updates.
109+
110+
### Root Namespace Properties
111+
112+
In V2, the root namespace is implicit and does not have a row in the `__manifest` table. Instead, root namespace properties are stored in the `__manifest` Lance table's metadata map. Properties are stored as key-value pairs where the key is the property name and the value is a UTF-8 encoded byte array.
113+
114+
For example, a partitioned namespace stores its `partition_spec_v1`, `partition_spec_v2`, and `schema` properties in the `__manifest` table's metadata.
115+
108116
### Manifest Table Indexes
109117

110118
The following indexes are created on the manifest table for query performance:

docs/src/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ and the operations available on these objects, enabling integration with metadat
88

99
![Namespace Overview](overview.png)
1010

11-
The Lance Namespace spec consists of three main parts:
11+
The Lance Namespace spec consists of four main parts:
1212

1313
1. **[Client Spec](client/index.md)**: A consistent abstraction that adapts to various catalog specs,
1414
allowing users to access and operate on a collection of tables in a multimodal lakehouse.
@@ -31,6 +31,10 @@ The Lance Namespace spec consists of three main parts:
3131
are considered **integrations** - anyone can provide additional implementation specs outside Lance Namespace,
3232
and they can be owned by external parties without needing to go through the Lance community voting process to be adopted.
3333

34+
4. **[Partitioning Spec](partitioning-spec.md)**: Defines a storage format for partitioned namespaces built on the Directory Namespace.
35+
It enables organizing data into physically separated units (partitions) that share a common schema,
36+
with support for partition evolution, pruning, and multi-partition transactions.
37+
3438
## How the Spec Translates to Code
3539

3640
![Namespace Java SDK Example](java-sdk-example.png)

0 commit comments

Comments
 (0)