phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chinmay Kulkarni (Jira)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-5580) Wrong values seen when updating a view for a table that has an index
Date Thu, 21 Nov 2019 02:17:00 GMT

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

Chinmay Kulkarni updated PHOENIX-5580:
--------------------------------------
    Description: 
CREATE TABLE IF NOT EXISTS TEST (ID INTEGER NOT NULL PRIMARY KEY, HOST VARCHAR(10));
 CREATE INDEX I ON TEST(HOST);

-- create updatable view (equality condition in where clause)
 CREATE VIEW V1 (col1 INTEGER) AS SELECT * FROM TEST WHERE ID=15;
 UPSERT INTO V1(ID, HOST, col1) VALUES (15, 'this', 7);

SELECT * FROM TEST;
-- Wrong results, but correct results when using the NO_INDEX hint

  was:
CREATE TABLE IF NOT EXISTS TEST (ID INTEGER NOT NULL PRIMARY KEY, HOST VARCHAR(10));
CREATE INDEX I ON TEST(HOST);
-- create updatable view (equality condition in where clause)
CREATE VIEW V1 (col1 INTEGER) AS SELECT * FROM TEST WHERE ID=15;
UPSERT INTO V1(ID, HOST, col1) VALUES (15, 'this', 7);

SELECT * FROM TEST;
-- Wrong results, but correct results when using the NO_INDEX hint


> Wrong values seen when updating a view for a table that has an index
> --------------------------------------------------------------------
>
>                 Key: PHOENIX-5580
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5580
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.15.0, 4.14.1, 4.14.3
>            Reporter: Swaroopa Kadam
>            Priority: Major
>             Fix For: 4.15.1, 5.1.1
>
>
> CREATE TABLE IF NOT EXISTS TEST (ID INTEGER NOT NULL PRIMARY KEY, HOST VARCHAR(10));
>  CREATE INDEX I ON TEST(HOST);
> -- create updatable view (equality condition in where clause)
>  CREATE VIEW V1 (col1 INTEGER) AS SELECT * FROM TEST WHERE ID=15;
>  UPSERT INTO V1(ID, HOST, col1) VALUES (15, 'this', 7);
> SELECT * FROM TEST;
> -- Wrong results, but correct results when using the NO_INDEX hint



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

Mime
View raw message