phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richárd Antal (Jira) <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-6519) Make SchemaTool work with lower case table and column names
Date Mon, 02 Aug 2021 08:35:00 GMT

     [ https://issues.apache.org/jira/browse/PHOENIX-6519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Richárd Antal updated PHOENIX-6519:
-----------------------------------
    Fix Version/s: 4.16.2

> Make SchemaTool work with lower case table and column names
> -----------------------------------------------------------
>
>                 Key: PHOENIX-6519
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6519
>             Project: Phoenix
>          Issue Type: Task
>          Components: core
>            Reporter: Richárd Antal
>            Assignee: Richárd Antal
>            Priority: Major
>             Fix For: 4.17.0, 5.2.0, 4.16.2, 5.1.3
>
>
> I wrote this test as part of a PR for PHOENIX-6518 and it fails.
> {code:java}
>     @Test
>     public void testCreateTableStatementLowerCase() throws Exception {
>         String tableName = "lowecasetbl1";
>         String schemaName = "lowecaseschemaname1";
>         String pTableFullName = SchemaUtil.getEscapedTableName(schemaName, tableName);
>         String createTableStmt = "CREATE TABLE "+ pTableFullName + "(\"smallK\" VARCHAR
NOT NULL PRIMARY KEY, "
>                 + "V1 VARCHAR, V2 VARCHAR) TTL=2592000, IMMUTABLE_ROWS=TRUE, DISABLE_WAL=TRUE";
>         List<String> queries = new ArrayList<String>(){};
>         queries.add(createTableStmt);
>         String result = runSchemaExtractionTool("\"" + schemaName + "\"", "\"" + tableName
+ "\"", null, queries);
>         Assert.assertEquals(createTableStmt, result.toUpperCase());
>     }{code}
> Expected:
> {code:java}
> CREATE TABLE "lowecaseschemaname1"."lowecasetbl1"("smallK" VARCHAR NOT NULL PRIMARY KEY,
V1 VARCHAR, V2 VARCHAR) TTL=2592000, IMMUTABLE_ROWS=TRUE, DISABLE_WAL=TRUE{code}
> Actual result:
> {code:java}
> CREATE TABLE LOWECASESCHEMANAME1.LOWECASETBL1(SMALLK VARCHAR NOT NULL PRIMARY KEY, V1
VARCHAR, V2 VARCHAR) TTL=2592000, IMMUTABLE_ROWS=TRUE, DISABLE_WAL=TRUE{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message