Skip to content

Add catalog properties for Catalog Tests#2982

Open
rambleraptor wants to merge 1 commit intoapache:mainfrom
rambleraptor:catalog_categories
Open

Add catalog properties for Catalog Tests#2982
rambleraptor wants to merge 1 commit intoapache:mainfrom
rambleraptor:catalog_categories

Conversation

@rambleraptor
Copy link
Contributor

Rationale for this change

I've added a list of catalog-level properties to help the catalog tests. The goal is that the catalog tests work off of "features" and don't have exceptions for various catalogs.

As part of this, I discovered a discrepancy where HiveCatalog throws a different error than everyone else. I'm happy to change it back.

Are these changes tested?

Mostly a test change.

Are there any user-facing changes?

@rambleraptor rambleraptor marked this pull request as ready for review January 29, 2026 23:29
@jayceslesar
Copy link
Contributor

this does make tests a little nicer but also is it worth publicly exposing these methods just for making tests nicer?

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rambleraptor for extending the tests, these have shown to be very valuable.

I'm not sure about all the methods, I think they might be misleading and I think they add a lot of noise in the public API.

except InvalidOperationException as e:
raise NamespaceNotEmptyError(f"Database {database_name} is not empty") from e
except MetaException as e:
except (MetaException, NoSuchObjectException) as e:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

Comment on lines +756 to +762
@abstractmethod
def supports_slash_in_identifier(self) -> bool:
"""Check if the catalog supports slash in identifier."""

@abstractmethod
def supports_dot_in_identifier(self) -> bool:
"""Check if the catalog supports dot in identifier."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These might be misleading. For example, some implementations of the REST protocol might support this, while others not.

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