You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Markus Steindl (JIRA)" <ji...@apache.org> on 2018/12/27 14:41:00 UTC

[jira] [Updated] (PHOENIX-5083) Array type in Hive Phoenix tables does not work

     [ https://issues.apache.org/jira/browse/PHOENIX-5083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Steindl updated PHOENIX-5083:
------------------------------------
    Description: 
In the following example I create a Hive Phoenix table with array<int> column.
 However, if I put something into this column, NULL is stored instead.
 I'm using hdp 2.6.0.3-8 and phoenix 4.7.0.2.6.0.3-8.

 

{{create table phoenix_table (}}
{{  id int,}}
{{  arr array<int>}}
{{)}}
{{STORED BY 'org.apache.phoenix.hive.PhoenixStorageHandler'}}
{{TBLPROPERTIES (}}
{{"phoenix.table.name" = "phoenix_table",}}
{{"phoenix.zookeeper.quorum" = "url1,url2,url3",}}
{{"phoenix.zookeeper.znode.parent" = "/hbase-unsecure",}}
{{"phoenix.zookeeper.client.port" = "2181",}}
{{"phoenix.rowkeys" = "id",}}
{{"phoenix.column.mapping" = "id:id, arr:arr",}}
{{"phoenix.table.options" = "DATA_BLOCK_ENCODING='DIFF'"}}
{{);}}

 

{{insert into phoenix_table}}
 {{select * from (}}
 {{select 123 as id, array(4, 5, 6) as arr}}
 {{) t;}}

 

{{select * from phoenix_table;}}
 {{123 NULL}}

 

  was:
In the following example I create a Hive Phoenix table with array<int> column.
However, if I put something into this column, NULL is stored instead.
I'm using hdp 2.6.0.3-8 and phoenix 4.7.0.2.6.0.3-8.

 

{{create table phoenix_table (}}
{{ id int,}}
{{ arr array<int>}}
{{)}}
{{STORED BY 'org.apache.phoenix.hive.PhoenixStorageHandler'}}
{{TBLPROPERTIES (}}
{{"phoenix.table.name" = "phoenix_table",}}
{{"phoenix.zookeeper.quorum" = "url1,url2,url3",}}
{{"phoenix.zookeeper.znode.parent" = "/hbase-unsecure",}}
{{"phoenix.zookeeper.client.port" = "2181",}}
{{"phoenix.rowkeys" = "id",}}
{{"phoenix.column.mapping" = "id:id, arr:arr",}}
{{"phoenix.table.options" = "DATA_BLOCK_ENCODING='DIFF'"}}
{{);}}

 

{{insert into phoenix_table}}
{{select * from (}}
{{select 123 as id, array(4, 5, 6) as arr}}
{{) t;}}

 

{{select * from phoenix_table;}}
{{123 NULL}}

 


> Array type in Hive Phoenix tables does not work
> -----------------------------------------------
>
>                 Key: PHOENIX-5083
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5083
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.7.0
>            Reporter: Markus Steindl
>            Priority: Major
>
> In the following example I create a Hive Phoenix table with array<int> column.
>  However, if I put something into this column, NULL is stored instead.
>  I'm using hdp 2.6.0.3-8 and phoenix 4.7.0.2.6.0.3-8.
>  
> {{create table phoenix_table (}}
> {{  id int,}}
> {{  arr array<int>}}
> {{)}}
> {{STORED BY 'org.apache.phoenix.hive.PhoenixStorageHandler'}}
> {{TBLPROPERTIES (}}
> {{"phoenix.table.name" = "phoenix_table",}}
> {{"phoenix.zookeeper.quorum" = "url1,url2,url3",}}
> {{"phoenix.zookeeper.znode.parent" = "/hbase-unsecure",}}
> {{"phoenix.zookeeper.client.port" = "2181",}}
> {{"phoenix.rowkeys" = "id",}}
> {{"phoenix.column.mapping" = "id:id, arr:arr",}}
> {{"phoenix.table.options" = "DATA_BLOCK_ENCODING='DIFF'"}}
> {{);}}
>  
> {{insert into phoenix_table}}
>  {{select * from (}}
>  {{select 123 as id, array(4, 5, 6) as arr}}
>  {{) t;}}
>  
> {{select * from phoenix_table;}}
>  {{123 NULL}}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)