Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Resolved
-
4.12.0
-
None
-
None
-
None
Description
For every new schema created through Phoenix, a row containing the schema name (with a 0x0 at the beginning and the end) is added to SYSTEM.CATALOG table. This is used for by other statements such as "USE SCHEMA" or "CREATE SCHEMA" to determine if the schema exists or not.
However when we turn on namespaces, SYSTEM tables are automatically migrated to SYSTEM namespace in HBase. However an SYSTEM.CATALOG entry with the row (\x0SYSTEM\x0) is not created. Thus other statements trying to use it might receive a SCHEMA_NOT_FOUND_EXCEPTION even though the schema exists in the file.
A "CREATE SCHEMA SYSTEM" statement can create the corresponding row entry in the SYSCAT table. This JIRA is to fix this behaviour and make it consistent for all schemas across Phoenix.