Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st. We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here. Need help or have questions? Drop us a line at [email protected]
3. Disconnect sqlline and reconnect without SCN. Drop the local index, insert more rows, recreate the index:
sqlline.py
drop index myidx on mytest;
upsert into mytest values ('678','678');
upsert into mytest values ('456','654');
create local index myidx on mytest (col2);
4. Re-attempt flashback query:
sqlline.py "example-3:2181/hbase-secure;currentSCN=1492595867867"
select * from mytest;
+-------+-------+
| COL1 | COL2 |
+-------+-------+
+-------+-------+
No rows selected (0.18 seconds)
select * from mytest where col2 = '123'
+-------+-------+
| COL1 | COL2 |
+-------+-------+
+-------+-------+
No rows selected (0.18 seconds)
SELECT /*+NO_INDEX*/ * from mytest;
select * from mytest;
+-------+-------+
| COL1 | COL2 |
+-------+-------+
| 123 | 123 |
| 456 | 456 |
+-------+-------+
ROOT CAUSE : This is because we create data for new indexes with the latest timestamp as in data table.Fix includes to create initial index also with the timestamp of the data. (at least for local index).
SOLUTION: Fix is available in next maintenance release of HDP 2.6. Request for a hotfix by a support case if you are on an earlier version.