You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Xinyi Yan (Jira)" <ji...@apache.org> on 2020/10/27 19:22:00 UTC

[jira] [Updated] (PHOENIX-5400) Table name while selecting index state is case sensitive

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

Xinyi Yan updated PHOENIX-5400:
-------------------------------
    Fix Version/s: 4.17.0

> Table name while selecting index state is case sensitive
> --------------------------------------------------------
>
>                 Key: PHOENIX-5400
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5400
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.13.0, 4.14.2
>            Reporter: Ashutosh Parekh
>            Assignee: Swaroopa Kadam
>            Priority: Minor
>             Fix For: 4.15.1, 5.1.1, 4.16.1, 4.17.0
>
>
> Initially, the following query is executed:
>  
> {code:java}
> CREATE TABLE IF NOT EXISTS us_population (
>  state CHAR(2) NOT NULL,
>  city VARCHAR NOT NULL,
>  population BIGINT,
>  CONSTRAINT my_pk PRIMARY KEY (state, city)) COLUMN_ENCODED_BYTES=0;
> UPSERT INTO us_population VALUES('NY','New York',8143197);
> UPSERT INTO us_population VALUES('CA','Los Angeles',3844829);
> UPSERT INTO us_population VALUES('IL','Chicago',2842518);
> UPSERT INTO us_population VALUES('TX','Houston',2016582);
> UPSERT INTO us_population VALUES('PA','Philadelphia',1463281);
> UPSERT INTO us_population VALUES('AZ','Phoenix',1461575);
> UPSERT INTO us_population VALUES('TX','San Antonio',1256509);
> UPSERT INTO us_population VALUES('CA','San Diego',1255540);
> UPSERT INTO us_population VALUES('TX','Dallas',1213825);
> UPSERT INTO us_population VALUES('CA','San Jose',912332);
> CREATE VIEW us_population_global_view (name VARCHAR,
>  age BIGINT) AS
> SELECT * FROM us_population
> WHERE state = 'CA';
> CREATE INDEX us_population_gv_gi_1 ON us_population_global_view(age) include (city) async;
> {code}
>  
> Then,
> {code:java}
> org.apache.phoenix.mapreduce.index.automation.PhoenixMRJobSubmitter{code}
> is run.
> After that, The following queries then lead to a different output:
> {code:java}
> SELECT INDEX_STATE FROM SYSTEM.CATALOG WHERE TABLE_NAME='us_population_gv_gi_1';{code}
> Output:
> {code:java}
> +--------------+
> | INDEX_STATE |
> +--------------+
> +--------------+
> No rows selected (0.076 seconds){code}
> and
> {code:java}
> SELECT INDEX_STATE FROM SYSTEM.CATALOG WHERE TABLE_NAME='US_POPULATION_GV_GI_1';{code}
> Output:
> {code:java}
> +--------------+
> | INDEX_STATE |
> +--------------+
> | b |
> | |
> | |
> | |
> | |
> +--------------+
> 5 rows selected (0.063 seconds){code}
> Only the case in which the table is mentioned in different in the above queries.
> Need an appropriate resolution for this.



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