phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gokcen Iskender (Jira)" <j...@apache.org>
Subject [jira] [Resolved] (PHOENIX-6217) WHERE statement that combines values from different column families (that runs on index on a table with SINGLE_CELL_ARRAY_WITH_OFFSETS) doesn't return correct results
Date Tue, 08 Dec 2020 02:01:00 GMT

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

Gokcen Iskender resolved PHOENIX-6217.
--------------------------------------
    Resolution: Duplicate

Dupe of PHOENIX-6023 

> WHERE statement that combines values from different column families (that runs on index
on a table with SINGLE_CELL_ARRAY_WITH_OFFSETS) doesn't return correct results 
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-6217
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6217
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Gokcen Iskender
>            Priority: Major
>
> CREATE IMMUTABLE TABLE S.TBL_N000001( varchar_pk VARCHAR NOT NULL, char_pk CHAR(10) NOT
NULL, int_pk INTEGER NOT NULL, long_pk BIGINT NOT NULL, decimal_pk DECIMAL(31, 10) NOT NULL,
date_pk DATE NOT NULL, a.varchar_col1 VARCHAR, a.char_col1 CHAR(10), a.int_col1 INTEGER, a.long_col1
BIGINT, a.decimal_col1 DECIMAL(31, 10), a.date1 DATE, b.varchar_col2 VARCHAR, b.char_col2
CHAR(10), b.int_col2 INTEGER, b.long_col2 BIGINT, b.decimal_col2 DECIMAL(31, 10), b.date2
DATE CONSTRAINT pk PRIMARY KEY (varchar_pk, char_pk, int_pk, long_pk DESC, decimal_pk, date_pk))
IMMUTABLE_STORAGE_SCHEME=SINGLE_CELL_ARRAY_WITH_OFFSETS,COLUMN_ENCODED_BYTES=2
> CREATE INDEX IF NOT EXISTS IND_N000002 ON S.TBL_N000001 (long_pk, varchar_pk) INCLUDE
(long_col1, long_col2) IMMUTABLE_STORAGE_SCHEME=SINGLE_CELL_ARRAY_WITH_OFFSETS,COLUMN_ENCODED_BYTES=2
>  
> String selectFromIndex = "SELECT long_pk, varchar_pk, long_col1, long_col2 FROM " + fullTableName
+ " where a.long_col1=2 and b.long_col2=3";
> rs = conn.createStatement().executeQuery("EXPLAIN " + selectFromIndex);
> assertTrue(QueryUtil.getExplainPlan(rs).contains(indexName));
> rs = conn.createStatement().executeQuery(selectFromIndex);
> assertTrue(rs.next());
> This test fails since the result set is empty.
> The same query that runs with /*+ NO_INDEX */ hint, returns results



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

Mime
View raw message