Hey Reid, 

Some questions:
What is the empty column value in the index table (actual hbase table) for corresponding row? 

Did you use IndexTool to rebuild the index?

Thanks


On Mon, Mar 30, 2020 at 9:22 AM Reid Chan <reidddchan@outlook.com> wrote:
Hey Josh! I'm glad you show up!

Version: 4.15-HBase-1.4

>> Did you `select * from index_table` verbatim?

Yes. Because I found that as long as the query goes to index (checked from EXPLAIN), the result must be empty. So I checked what're inside index by select * index.


>> Caveat about covered columns in a query

Data table is (A primary key, B, C, D, E, ...), index on B include C . B, C columns are nullable.


>> What's the state of the index?

Index_state shows "a". What does it mean?


>> * Did you use Phoenix to create the data+index tables and to populate the data in those tables?

Yes.



--------------------------

Best regards,
R.C



________________________________________
From: Josh Elser <elserj@apache.org>
Sent: 30 March 2020 23:42
To: user@phoenix.apache.org
Subject: Re: Select * gets 0 rows from index table

Hey Reid!

Can you clarify a couple of things?

* What version of Phoenix?
* Did you `select * from index_table` verbatim? Most of the time, when
you have an index table, you'd be interacting with the data table which
(behind the scenes) goes to the index table.
* * Caveat about covered columns in a query
* What's the state of the index? Look at the INDEX_STATE column in
system.catalog for your index table.
* Did you use Phoenix to create the data+index tables and to populate
the data in those tables?

On 3/30/20 4:35 AM, Reid Chan wrote:
> Hi team,
>
> I encountered a problem that select * from index_table limit x got 0 rows, but underlying hbase has data (observed it from hbase shell > scan) and any queries went to index table would get 0 rows as well.
>
> In the meantime the server had the following error message: "index.GlobalIndexChecker: Could not find the newly rebuilt index row with row key xxx for table yyy."
>
> Looking forward to get some hints from experienced users and devs.
>
> Thanks!
>
> --------------------------
>
> Best regards,
> R.C
>
>
--
 
Swaroopa Kadam