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

    https://github.com/apache/phoenix/pull/284#discussion_r154276127
  
    --- 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 --
    
    This code would automatically uppercase the schema irrespective of 
considering if it's enclosed in quotes or not. It will use that value to 
validate the schema. However, will creating, it will use the regular name. 
Checkout Line 4093. This seems an inconsistent logic to me. 
    For the query
    `CREATE SCHEMA "ABC"`, this code will create to create a schema with name 
`"ABC"` with the double quotes. There was no test that was actually testing 
this and thus it wasn't caught yet. I wrote a test in `QueryParserTest` and 
caught it.
    @JamesRTaylor Please advice.


---

Reply via email to