Karan Mehta created PHOENIX-4228:
------------------------------------

             Summary: Schema set by "USE SCHEMA" statement is used even when 
schema name is set explicitly
                 Key: PHOENIX-4228
                 URL: https://issues.apache.org/jira/browse/PHOENIX-4228
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.12.0
            Reporter: Karan Mehta


The following is the documented behavior for USE SCHEMA statement.
{code}
Sets a default schema for the connection and is used as a target schema for all 
statements issued from the connection that do not specify schema name 
explicitly. USE DEFAULT unset the schema for the connection so that no schema 
will be used for the statements issued from the connection.
{code}
However this behaviour is not honoured for certain statements. For example if 
the following SQL is executed
{code}
1. USE SCHEMA SCHEMA1;
2. SELECT * FROM SCHEMA2.TABLE2;
{code}
Phoenix will try to resolve the table {{SCHEMA2.TABLE2}} to 
{{SCHEMA1.SCHEMA2.TABLE2}} and hence will fail, even though SCHEMA2.TABLE2 
table can exist. This JIRA is to track the fix for the table name resolver.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to