You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Chao Wang (Jira)" <ji...@apache.org> on 2020/11/06 09:08:00 UTC

[jira] [Commented] (PHOENIX-6215) Failed to create local index if I set column default value

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

Chao Wang commented on PHOENIX-6215:
------------------------------------

first you can watch data format of local index in hbase shell, which is ok?

> Failed to create local index if I set column default value 
> -----------------------------------------------------------
>
>                 Key: PHOENIX-6215
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6215
>             Project: Phoenix
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 5.0.0
>         Environment: phoenix-5.0.0-cdh6.2.0
>            Reporter: 张嘉昊
>            Priority: Major
>         Attachments: image-2020-11-05-17-32-00-661.png
>
>
> this is my create table sql:
> ```
> CREATE TABLE MODEL_GROUP_RULE_ACCOUNT.EMPLOYEE_LABEL_TRANSPOSITION_H (
> tag_id varchar(200) not null,
> tag_name varchar(20000) null,
> user_id varchar(200) not null ,
> user_name varchar(20000) null,
> tag_value varchar(1000) null,
> tag_type INTEGER null,
> version INTEGER not null default 1,
> create_time varchar(50) null,
> update_time varchar(50) null,
> ttl INTEGER null , 
> sync2icome tinyint default 0,
> isdelete tinyint default 0,
> CONSTRAINT pk PRIMARY KEY (tag_id, user_id, version) ) SALT_BUCKETS = 10 ;
> ```
>  I set column `version` default 1, `sync2icome` default 0, `isdelete` default 0.
> After I create a local index, I don't know if this is a bug, I find this below.
>  
>   !image-2020-11-05-17-32-00-661.png|width=551,height=299!
>  
> If I create local index on 2 columns, which are not set default value, that's ok; but if there is a column which has been set default value, then I select * from index_table , I find the data has been changed. 
>  
> Is this a bug or I make a mistake?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)