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

JaeMyung Kim edited comment on PHOENIX-2953 at 6/7/16 2:01 AM:
---------------------------------------------------------------

I tested in phoenix sqline.

create table PHOENIX_TEST2 (
        ID char(32) not null PRIMARY KEY,
        A.IMAGE_BYTE varbinary,
        B.COME_FROM varbinary
) SALT_BUCKETS=16 , DEFAULT_COLUMN_FAMILY = 'A'

It was inserted two records,
  ID='0000485eea3b6f60e286ec06af70e22b',  IMAGE_BYTE=> 3MB sized is image bytes
  ID='0000552574a27ab4601df3615f236567',  IMAGE_BYTE=> 1.5MB sized is image 
bytes


0: jdbc:phoenix:localhost:2181:/hbase> select * from PHOENIX_TEST2;
+----------------------------------+------------------------------------------+----------------------------------+
|                ID                       |                IMAGE_BYTE           
     |                COME_FROM      |
| 0000485eea3b6f60e286ec06af70e22b | [B@3db6ca90           |                    
              |
| 0000552574a27ab4601df3615f236567 | [B@2bacd397            | [B@5f7774e7       
               |


0: jdbc:phoenix:localhost:2181:/hbase> select COME_FROM from PHOENIX_TEST2;
+------------------------------------------+
|                COME_FROM                 |
| [B@4cb3bba1                              |
| [B@2be36e5e                              |


COME_FROM value of 0000485eea3b6f60e286ec06af70e22b  was null  if it was 
queried "select * .. " but was not null if it was queried "select COME_FROM .."



was (Author: windbird):
I tested in phoenix sqline.

create table PHOENIX_TEST2 (
        ID char(32) not null PRIMARY KEY,
        A.IMAGE_BYTE varbinary,
        B.COME_FROM varbinary
) SALT_BUCKETS=16 , DEFAULT_COLUMN_FAMILY = 'A'

It was inserted two records,
  ID='0000485eea3b6f60e286ec06af70e22b',  IMAGE_BYTE=> 3MB sized is image bytes
  ID='0000552574a27ab4601df3615f236567',  IMAGE_BYTE=> 1.5MB sized is image 
bytes


0: jdbc:phoenix:localhost:2181:/hbase> select * from PHOENIX_TEST2;
+----------------------------------+------------------------------------------+----------------------------------+
|                ID                       |                IMAGE_BYTE           
     |                COME_FROM      |
+----------------------------------+------------------------------------------+----------------------------------+
| 0000485eea3b6f60e286ec06af70e22b | [B@3db6ca90           |                    
              |
| 0000552574a27ab4601df3615f236567 | [B@2bacd397            | [B@5f7774e7       
               |


0: jdbc:phoenix:localhost:2181:/hbase> select COME_FROM from PHOENIX_TEST2;
+------------------------------------------+
|                COME_FROM                 |
------------------------------------------
| [B@4cb3bba1                              |
| [B@2be36e5e                              |


COME_FROM value of 0000485eea3b6f60e286ec06af70e22b  was null  if it was 
queried "select * .. " but was not null if it was queried "select COME_FROM .."


> some value is returned null when selecting query if phoenix table has a big 
> length column
> -----------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-2953
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2953
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.5.2
>         Environment: cloudera hadoop - 5.5.2 
> phoenix-4.5.2
>            Reporter: JaeMyung Kim
>
> I created table 
> create table PHOENIX_TEST (
>       ID char(32) not null PRIMARY KEY,
>       A.IMAGE_BYTE varbinary,
>       B.COME_FROM varbinary
> )SALT_BUCKETS=16
> IMAGE_BYTE can be 50KB~10MB, and 200 records are inserted
> Every column value of record in PHOENIX_TEST is not null, but 
> PhoenixResultSet sometimes returns null column value.
> Here is my test code.
> val lookupStatement = phoenixConnection.prepareStatement("select ID, 
> IMAGE_BYTE, COME_FROM from PHOENIX_TEST")
> lookupStatement.setQueryTimeout(60000)
> val rs = lookupStatement.executeQuery()
> while (rs.next()) {
>         val id = rs.getString("ID")
>       val s = rs.getBytes("COME_FROM")
>         if (s == null) {
>                 println(s"Something is wrong, every value of COME_FROM is not 
> NULL, id=$id")
>         }
> }
> rs.close()
> lookupStatement.close()
> if I exclude IMAGE_BYTE, it was OK. 
> select ID, COME_FROM from PHOENIX_TEST



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to