[ https://issues.apache.org/jira/browse/PHOENIX-7239?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephen Yuan Jiang reassigned PHOENIX-7239: ------------------------------------------- Assignee: Hari Krishna Dara > When an uncovered index has different number of salt buckets than the data > table, query returns no data > ------------------------------------------------------------------------------------------------------- > > Key: PHOENIX-7239 > URL: https://issues.apache.org/jira/browse/PHOENIX-7239 > Project: Phoenix > Issue Type: Bug > Environment: When you use a salt bucketing value for index that is > different from that of data table, you get no results. As can be seen from > below examples, when using index with buckets of 4 (same as the buckets in > data table), there were results, but when it was 1 or 2, there were none. > > {{0: jdbc:phoenix:localhost> create table tsalt (k INTEGER PRIMARY KEY, v1 > INTEGER) SALT_BUCKETS=4;}} > {{0: jdbc:phoenix:localhost> upsert into tsalt (k, v1) VALUES (1, 100);}} > {{0: jdbc:phoenix:localhost> create uncovered index tsaltidx on tsalt > (PHOENIX_ROW_TIMESTAMP());}} > {{select /*+ INDEX(TSALT TSALTIDX) */ * from TSALT;}} > {{+---+----+}} > {{| K | V1 |}} > {{+---+----+}} > {{+---+----+}} > {{No rows selected (0.059 seconds)}} > {{0: jdbc:phoenix:localhost> create uncovered index tsaltidx4 on tsalt > (PHOENIX_ROW_TIMESTAMP());}} > {{1 row affected (6.175 seconds)}} > {{0: jdbc:phoenix:localhost> select /*+ INDEX(TSALT TSALTIDX4) */ * from > TSALT;}} > {{+---+-----+}} > {{| K | V1 |}} > {{+---+-----+}} > {{| 1 | 100 |}} > {{+---+-----+}} > {{1 row selected (0.035 seconds)}} > {{0: jdbc:phoenix:localhost> create uncovered index tsaltidx on tsalt2 > (PHOENIX_ROW_TIMESTAMP()) salt_buckets=2;}} > {{0: jdbc:phoenix:localhost> select /*+ INDEX(TSALT TSALTIDX2) */ * from > TSALT;}} > {{+---+----+}} > {{| K | V1 |}} > {{+---+----+}} > {{+---+----+}} > {{No rows selected (0.059 seconds)}} > Reporter: Hari Krishna Dara > Assignee: Hari Krishna Dara > Priority: Major > -- This message was sent by Atlassian Jira (v8.20.10#820010)