You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SqlCatalog: namespace_exists matches parent namespaces case-insensitively on SQLite #4163
SqlCatalog.namespace_exists treats a namespace as existing when a child namespace exists, and checks that with LIKE '<namespace>.%'. SQLite evaluates LIKE case-insensitively for ASCII characters, so on SQLite a namespace that differs only in case from the parent of an existing namespace is reported as existing. The exact-match lookups elsewhere in the catalog (==) are case-sensitive, so the catalog ends up inconsistent with itself, and the result differs from PostgreSQL, where LIKE is case-sensitive.
Because create_table, register_table, rename_table, drop_namespace, list_tables, list_namespaces and the namespace property methods all go through namespace_exists, the effects show up across the API:
On a fresh catalog with only sales.eu, cat.create_namespace("SALES") raises NamespaceAlreadyExistsError: Namespace SALES already exists, and cat.load_namespace_properties("SALES") returns {} instead of raising NoSuchNamespaceError.
Expected: namespace_exists("SALES") returns False when only sales / sales.eu exist, matching the case-sensitive exact lookups and the PostgreSQL behaviour. create_table("SALES.orders") raises NoSuchNamespaceError and create_namespace("SALES") succeeds.
Without a nested namespace the check is correct (namespace_exists("SALES") is False when only sales exists), because only the LIKE branch is affected.
Thanks for the clear repro. I would like to take this one: the fix should make the child-namespace LIKE check case-sensitive so it matches the exact lookups and the PostgreSQL behaviour. I will open a PR shortly.
Activity
Shahzeb-DataEngineer commentedon Oct 28, 2026
Thanks for the clear repro. I would like to take this one: the fix should make the child-namespace
LIKEcheck case-sensitive so it matches the exact lookups and the PostgreSQL behaviour. I will open a PR shortly.