You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "张嘉昊 (Jira)" <ji...@apache.org> on 2020/11/05 09:38:00 UTC

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

张嘉昊 created PHOENIX-6215:
----------------------------

             Summary: 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: 张嘉昊
         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)