Description
I am using 4.8.1 with HBase 1.2.3. I am talking to Phoenix using the Phoenix Query Server (Avatica)
phoenix.schema.isNamespaceMappingEnabled is set to true in my configuration.
To reproduce the problem:
1. Execute CREATE SCHEMA IF NOT EXISTS myschema
2. Open a connection to the query server and set the schema to myschema by setting the info map to
in the OpenConnectionRequest: https://calcite.apache.org/docs/avatica_protobuf_reference.html#openconnectionrequest
2. Execute CREATE TABLE test_table1 (id integer not null primary key)
3. ExecuteUPSERT INTO test_table1 (id) VALUES(1)
Until this point, the schema and table were all created correctly. Upserting also works. If we check system.catalog, we can confirm that the table was created as myschema.test_table1.
4. If we attempt to drop the table using the same connection, it neglects to include the schema, so it fails: DROP TABLE test_table1
RuntimeException: org.apache.phoenix.schema.TableNotFoundException: ERROR 1012 (42M03): Table undefined. tableName=TEST_TABLE1 -> TableNotFoundException: ERROR 1012 (42M03): Table undefined. tableName=TEST_TABLE1
The same problem can be reproduced with DROP SEQUENCE.