[
https://issues.apache.org/jira/browse/PHOENIX-4424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16274007#comment-16274007
]
ASF GitHub Bot commented on PHOENIX-4424:
-----------------------------------------
Github user karanmehta93 commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/284#discussion_r154275774
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/parse/CreateSchemaStatement.java
---
@@ -24,7 +24,7 @@
private final boolean ifNotExists;
public CreateSchemaStatement(String schemaName,boolean ifNotExists) {
- this.schemaName = null == schemaName ?
SchemaUtil.SCHEMA_FOR_DEFAULT_NAMESPACE : schemaName;
+ this.schemaName = SchemaUtil.normalizeIdentifier(schemaName);
--- End diff --
@JamesRTaylor from JIRA comment
> Identifiers are case sensitive when they are double quoted in Phoenix
(and SQL in general). Otherwise they are uppercased. We shouldn’t/can’t change
that.
This code change will now make it adhere to SQL standards. The
`SchemaUtil.normalizeIdentifier` will help handle the case sensitivity.
Otherwise with the current code, if a schema name is passed with double quotes,
the full name will be taken as it is for creating the schema, which is
incorrect.
Also look for comments in `MetaDataClient` as well.
> Allow users to create "DEFAULT" and "HBASE" Schema (Uppercase Schema Names)
> ---------------------------------------------------------------------------
>
> Key: PHOENIX-4424
> URL: https://issues.apache.org/jira/browse/PHOENIX-4424
> Project: Phoenix
> Issue Type: Bug
> Reporter: Karan Mehta
> Assignee: Karan Mehta
> Attachments: PHOENIX-4424.001.patch
>
>
> We currently block users to create "DEFAULT" and "HBASE" schema, however it
> should be actually "default" and "hbase" since hbase namespace is case
> sensitive. Hence we should update it and allow is users want to create
> schema's with those names.
> If user wants to access the schema names with capital letters, they can pass
> it in directly (Phoenix will automatically upper-case it) or pass it in
> uppercase letters with double-quotes.
> FYI.
> [[email protected]]
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)