Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dingo4dev
Copy link
Contributor

@dingo4dev dingo4dev commented Oct 16, 2025

Rationale for this change

This PR introduces support for multi-part namespaces, enabling more flexible and organized data layouts. This feature allows users to structure their tables within nested hierarchies (e.g., ('database', 'schema', 'table')), which is a common pattern in many data warehouse systems.

The level of support varies depending on the underlying catalog implementation. Here's a summary of the changes:

Catalog Implementation Multi-Part Namespace Support Notes
REST Catalog ✅ Yes Fully supports multi-part namespaces as defined by the REST spec.
DynamoDB Catalog ✅ Yes The namespace is represented as a composite key.
File Catalog ✅ Yes Namespace parts are mapped to directory hierarchies in the file system.
In-Memory Catalog ✅ Yes Supports multi-part namespaces for testing purposes.
Hive Catalog ❌ No Spark and Hive Metastore do not support multi-part namespaces.
Glue Catalog ❌ No Uses AWS Glue databases which do not support multi-part namespaces.

closes #2240

Are these changes tested?

Yes, this PR includes comprehensive test coverage:

  • Unit tests: Added test_list_multipart_namespaces_200() in tests/catalog/test_rest.py to verify multi-part namespace listing via REST API
  • Integration tests: Existing catalog integration tests validate multi-part namespace behavior across different catalog implementations
  • Documentation: Added mkdocs/docs/multi-part-namespace.md with usage examples and catalog compatibility matrix
  • CI validation: All test suites (lint-and-test, integration-test, docs, rat) pass successfully across Python 3.10, 3.11, and 3.12

Are there any user-facing changes?

Yes, this introduces a new user-facing feature:

Breaking changes: None. This is a backward-compatible addition.

New capabilities:

  • Users can now create and manage tables with multi-part namespaces (e.g., catalog.create_table("database.schema.table", ...))
  • Multi-level namespace hierarchies are supported where the underlying catalog permits
  • The delimiter (.) is used consistently across catalog implementations

API changes:

  • Catalog class now exposes _support_namespaces attribute to indicate multi-part namespace support
  • New helper methods: namespace_level() for determining namespace depth
  • Updated identifier_to_database() and related methods to handle multi-part identifiers

Documentation:

  • New documentation file (multi-part-namespace.md) explains usage patterns and catalog-specific support
  • Includes code examples for creating tables with multi-part namespaces

@dingo4dev dingo4dev changed the title feat: Add support for multi-part namespaces feat: add support for multipart namespaces Oct 16, 2025
@dingo4dev dingo4dev force-pushed the feat/mutipart-namesapce branch from 52d7283 to c8cf40a Compare November 12, 2025 16:40
Enables catalogs to support hierarchical organization of tables through multi-part namespaces.

Introduces changes to the Catalog class and its implementations (DynamoDB, REST, SQL) to handle multi-part namespaces.
A new document is added to explain the usage of the multi-part namespace feature.

enable multipart namespace

Multipart namespace efers to a namespace that is structured with multiple levels or parts and default separated by a delmiiter dot (`.`)
improved type handling and added utility methods
@dingo4dev dingo4dev force-pushed the feat/mutipart-namesapce branch from 215bd58 to cc97382 Compare November 13, 2025 11:37
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.

[Feature Request] Add Support for Multipart Namespace

1 participant