Re: AW: Duplicate Records Showing in Apache Phoenix

2018-06-20 Thread Jaanai Zhang
May some fields got incorrectly reflect after upgrading from 4.8 to 4.12,
so it could not print all selected data.



   Yun Zhang
   Best regards!


2018-06-18 16:41 GMT+08:00 Azharuddin Shaikh :

> Hi,
>
> We have upgraded the phoenix version to 4.12 from 4.8 but now we are facing
> an issue while performing table load using hbase import table utility.
>
> Data is getting imported but when we are performing any select operation on
> the loaded table it is not reflecting any records, only columns are getting
> printed.
>
> We are facing this issue only after performing phoenix version upgrade from
> 4.8  to 4.12.
>
>
>
> --
> Sent from: http://apache-phoenix-user-list.1124778.n5.nabble.com/
>


Re: Null array elements with joins

2018-06-20 Thread Tulasi Paradarami
Tested on 4.7, 4.11 & 4.14.
https://issues.apache.org/jira/browse/PHOENIX-4791


On Tue, Jun 19, 2018 at 8:10 PM Jaanai Zhang  wrote:

> what's your Phoenix's version?
>
>
> 
>Yun Zhang
>Best regards!
>
>
> 2018-06-20 1:02 GMT+08:00 Tulasi Paradarami :
>
>> Hi,
>>
>> I'm running few tests against Phoenix array and running into this bug
>> where array elements return null values when a join is involved. Is this a
>> known issue/limitation of arrays?
>>
>> create table array_test_1 (id integer not null primary key, arr
>> tinyint[5]);
>> upsert into array_test_1 values (1001, array[0, 0, 0, 0, 0]);
>> upsert into array_test_1 values (1002, array[0, 0, 0, 0, 1]);
>> upsert into array_test_1 values (1003, array[0, 0, 0, 1, 1]);
>> upsert into array_test_1 values (1004, array[0, 0, 1, 1, 1]);
>> upsert into array_test_1 values (1005, array[1, 1, 1, 1, 1]);
>>
>> create table test_table_1 (id integer not null primary key, val varchar);
>> upsert into test_table_1 values (1001, 'abc');
>> upsert into test_table_1 values (1002, 'def');
>> upsert into test_table_1 values (1003, 'ghi');
>>
>> 0: jdbc:phoenix:localhost> select t1.id, t2.val, t1.arr[1], t1.arr[2],
>> t1.arr[3] from array_test_1 as t1 join test_table_1 as t2 on t1.id =
>> t2.id;
>>
>> ++-++++
>> | T1.ID  | T2.VAL  | ARRAY_ELEM(T1.ARR, 1)  | ARRAY_ELEM(T1.ARR, 2)  |
>> ARRAY_ELEM(T1.ARR, 3)  |
>>
>> ++-++++
>> | 1001   | abc | null   | null   |
>> null   |
>> | 1002   | def | null   | null   |
>> null   |
>> | 1003   | ghi | null   | null   |
>> null   |
>>
>> ++-++++
>> 3 rows selected (0.056 seconds)
>>
>> However, directly selecting array elements from the array returns data
>> correctly.
>> 0: jdbc:phoenix:localhost> select t1.id, t1.arr[1], t1.arr[2], t1.arr[3]
>> from array_test_1 as t1;
>>
>> +---+-+-+-+
>> |  ID   | ARRAY_ELEM(ARR, 1)  | ARRAY_ELEM(ARR, 2)  | ARRAY_ELEM(ARR, 3)
>> |
>>
>> +---+-+-+-+
>> | 1001  | 0   | 0   | 0
>>  |
>> | 1002  | 0   | 0   | 0
>>  |
>> | 1003  | 0   | 0   | 0
>>  |
>> | 1004  | 0   | 0   | 1
>>  |
>> | 1005  | 1   | 1   | 1
>>  |
>>
>> +---+-+-+-+
>> 5 rows selected (0.044 seconds)
>>
>>
>>
>