phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcin Januszkiewicz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (PHOENIX-4337) Querying table with index fails in some configurations.
Date Tue, 31 Oct 2017 08:52:00 GMT
Marcin Januszkiewicz created PHOENIX-4337:
---------------------------------------------

             Summary: Querying table with index fails in some configurations.
                 Key: PHOENIX-4337
                 URL: https://issues.apache.org/jira/browse/PHOENIX-4337
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.12.0
            Reporter: Marcin Januszkiewicz


We have a phoenix table created with:

{code:sql}
CREATE TABLE traces (
rowkey VARCHAR PRIMARY KEY,
time VARCHAR,
number VARCHAR,
security VARCHAR);

CREATE LOCAL INDEX t0
ON traces (UPPER(number))
INCLUDE (security,  time);

UPSERT INTO traces values (
  'BXRFW10BK-$d2affbaf',
  '2017-09-26T07:43:01.152Z',
  'PO X',
  'test');
{code}

The query:
{code:sql}
SELECT rowkey
FROM traces
WHERE (UPPER(number) LIKE 'PO %')
  AND (security = 'test')
ORDER BY time;
{code}
causes an exception:
{noformat}
Error: org.apache.phoenix.exception.PhoenixIOException:
org.apache.hadoop.hbase.DoNotRetryIOException:
TRACES,,1509360217824.b44920f7875ef688c3224ce1681d1035.: null
        at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:96)
        at org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:62)
        at org.apache.phoenix.iterate.RegionScannerFactory$1.nextRaw(RegionScannerFactory.java:212)
        at org.apache.phoenix.iterate.RegionScannerResultIterator.next(RegionScannerResultIterator.java:61)
        at org.apache.phoenix.iterate.OrderedResultIterator.getResultIterator(OrderedResultIterator.java:255)
        at org.apache.phoenix.iterate.OrderedResultIterator.next(OrderedResultIterator.java:199)
        at org.apache.phoenix.iterate.NonAggregateRegionScannerFactory.getTopNScanner(NonAggregateRegionScannerFactory.java:320)
        at org.apache.phoenix.iterate.NonAggregateRegionScannerFactory.getRegionScanner(NonAggregateRegionScannerFactory.java:162)
        at org.apache.phoenix.coprocessor.ScanRegionObserver.doPostScannerOpen(ScanRegionObserver.java:72)
        at org.apache.phoenix.coprocessor.BaseScannerRegionObserver$RegionScannerHolder.overrideDelegate(BaseScannerRegionObserver.java:236)
        at org.apache.phoenix.coprocessor.BaseScannerRegionObserver$RegionScannerHolder.nextRaw(BaseScannerRegionObserver.java:284)
        at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:2541)
        at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:33648)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2183)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:112)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:183)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:163)
Caused by: java.lang.NullPointerException (state=08000,code=101)
{noformat}
However, the following queries succeed:
{code:sql}
SELECT rowkey, security
FROM traces
WHERE (UPPER(number) LIKE 'PO %')
  AND (security = 'test')
ORDER BY time;

SELECT rowkey
FROM traces
WHERE (UPPER(number) LIKE 'PO %')
ORDER BY time;

SELECT rowkey
FROM traces
WHERE (UPPER(number) LIKE 'PO %')
  AND (security = 'test');
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message