[ 
https://issues.apache.org/jira/browse/PHOENIX-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16597906#comment-16597906
 ] 

Gardella Juan Pablo commented on PHOENIX-4869:
----------------------------------------------

If I execute:
{code:sql}
explain  select /*+ NO_INDEX */  count(*) from (SELECT /*+ NO_INDEX */ ID FROM 
TEST LIMIT 100000 OFFSET 100000) where ID is null 
{code}

{{explain}} still shows:

{code:java}
CLIENT 9-CHUNK 1893493 ROWS 2202012384 BYTES SERIAL 1-WAY ROUND ROBIN FULL SCAN 
OVER TESTIX
    SERVER FILTER BY FIRST KEY ONLY
    SERVER OFFSET 100000
    SERVER 200000 ROW LIMIT
CLIENT 100000 ROW LIMIT
CLIENT FILTER BY ID IS NULL
CLIENT AGGREGATE INTO SINGLE ROW
{code}

> Empty row when using OFFSET + LIMIT
> -----------------------------------
>
>                 Key: PHOENIX-4869
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4869
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.7.0
>            Reporter: Gardella Juan Pablo
>            Priority: Major
>         Attachments: empty_row.png, no_results.png, sample.PNG
>
>
> I'm using [Phoenix shipped 
> |https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.1/bk_release-notes/content/patch_phoenix.html]at
>  [HDP 
> 2.6.1|https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.1/index.html]. I 
> have a table defined as:
> {code:sql}
>  
> create table test (
>    id VARCHAR not null primary key,
>    json VARCHAR,
>    ts timestamp
> )
> CREATE INDEX testix ON test (ts ) INCLUDE(id,json);
> {code}
> It has 2559774 rows. If I execute the following query, it returns a row with 
> a null value.
> {code:sql}
> select * from
> (
>    SELECT ID
>    FROM test
>    LIMIT 100000 OFFSET 100000
> )
> where ID is null
> {code}
>  
>  I was reviewing the git logs and I didn't see any commit related to that[1]. 
> Notice the query for OFFSET and LIMIT lowers than 100000 does not fail. I've 
> attached a capture of the query results.
> !empty_row.png!
> Notice if I execute SELECT ID FROM test WHERE ID IS NULL returns an empty 
> result as expected.
> !no_results.png! 
>   
> Thread: 
> [https://lists.apache.org/thread.html/fd54a0cf623a20ad54d1ac65656d01add8eeef74ad51fb1674afb566@%3Cuser.phoenix.apache.org%3E]
>  [1] Similar but not equal is PHOENIX-3422. The results is no data instead of 
> null row.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to