phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jaanai (JIRA)" <>
Subject [jira] [Created] (PHOENIX-5171) SkipScan incorrectly filters composite primary key which the trailing is NULL
Date Thu, 28 Feb 2019 03:03:00 GMT
jaanai created PHOENIX-5171:

             Summary: SkipScan incorrectly filters composite primary key which the trailing
is NULL 
                 Key: PHOENIX-5171
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.14.1, 5.0.0
            Reporter: jaanai
            Assignee: jaanai

Running the below SQL:
create table if not exists aiolos(
vdate varchar,
tab varchar,
dev tinyint not null,
app varchar,
target varchar,
channel varchar,
one varchar,
two varchar,
count1 integer,
count2 integer,
CONSTRAINT PK PRIMARY KEY (vdate,tab,dev,app,target,channel,one,two));

upsert into aiolos values('2018-02-14','channel_agg',2,null,null,'A004',null,null,2,2);
upsert into aiolos values('2018-02-14','channel_agg',2,null,null,null,null,null,2,2);

SELECT vdate FROM aiolos WHERE dev = 2 AND vdate BETWEEN '2018-02-10' AND '2019-02-19' AND
tab = 'channel_agg' and channel='A004';
Throws exception:
Caused by: java.lang.IllegalStateException: The next hint must come after previous hint (prev=2018-02-14\x00channel_agg\x00\x82//LATEST_TIMESTAMP/Maximum/vlen=0/seqid=0,
next=2018-02-14\x00channel_agg\x00\x82//LATEST_TIMESTAMP/Maximum/vlen=0/seqid=0, kv=2018-02-14\x00channel_agg\x00\x82/0:\x00\x00\x00\x00/1550642992223/Put/vlen=4/seqid=5445463)
	at org.apache.phoenix.filter.SkipScanFilter.setNextCellHint(
	at org.apache.phoenix.filter.SkipScanFilter.filterKeyValue(
	at org.apache.hadoop.hbase.filter.FilterList.filterKeyValue(
	at org.apache.hadoop.hbase.regionserver.ScanQueryMatcher.match(
	at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.populateResult(
	at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextInternal(
	at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextRaw(
	at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextRaw(
	at org.apache.phoenix.iterate.RegionScannerFactory$1.nextRaw(
	... 8 more
The caused by adding skipped row into nextCellHintMap. Actually,  due to we don't store NULL
at the end of the key for the variable data type,  these keys should be skipped when invokes
filterKeyValue,  because they are smaller than the rest of the positions of the slots.

This message was sent by Atlassian JIRA

View raw message