Github user karanmehta93 commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/284#discussion_r154406035
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---
    @@ -4125,7 +4125,7 @@ public MutationState 
createSchema(CreateSchemaStatement create) throws SQLExcept
     
         private void validateSchema(String schemaName) throws SQLException {
             if (SchemaUtil.NOT_ALLOWED_SCHEMA_LIST.contains(
    -                schemaName.toUpperCase())) { throw new 
SQLExceptionInfo.Builder(SQLExceptionCode.SCHEMA_NOT_ALLOWED)
    --- End diff --
    
    @ankitsinghal 
    You are correct, the schema gets normalized when we try to create a 
`PSchema` object and we use `PSchema.getSchemaName()` method which returns the 
correct schema name. Thanks for pointing it out.
    However, the issue is that the normalization doesn't happen before checking 
the validity of the schema. As of now, the schema is uppercased even before 
checking if its without quotes or with quotes. This leads to issue when you try 
to create schema with the names DEFAULT or HBASE, which is the focus for this 
JIRA.
    I will update the patch accordingly.


---

Reply via email to