You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2014/08/09 03:28:11 UTC

[jira] [Resolved] (PHOENIX-1088) Cannot insert data , while Index is empty string

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

James Taylor resolved PHOENIX-1088.
-----------------------------------

    Resolution: Not a Problem

In Phoenix, an empty string is equal to null (like in Oracle and some other databases).

> Cannot insert data , while Index is empty string
> ------------------------------------------------
>
>                 Key: PHOENIX-1088
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1088
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>         Environment: hadoop (2.3.0+cdh5.0.0+548)
> hbase(0.96.1.1+cdh5.0.0+60)
>            Reporter: minqiang.li
>              Labels: Index
>             Fix For: 4.1
>
>
> This is my create Table DDL.
> create table TAB_PS_XDR ( K VARCHAR NOT NULL PRIMARY KEY, A VARCHAR,  B VARCHAR, C VARCHAR, D VARCHAR, V VARCHAR) COMPRESSION='SNAPPY',SALT_BUCKETS=12,TTL='7200',VERSIONS='5';
> create index CALLING_NUMBER on TAB_PS_XDR (A);
> create index CALLED_NUMBER on TAB_PS_XDR (B);
> create index IMSI on TAB_PS_XDR (C);
> create index IMEI on TAB_PS_XDR (D);
> And then I begin insert data to test DB.
> UPSERT INTO TAB_PS_XDR VALUES('aaaaaaacbaa11','', '','','1','1');
> UPSERT INTO TAB_PS_XDR VALUES('bbaaaabbaa11','', '','','1','1');
> UPSERT INTO TAB_PS_XDR VALUES('ccaaaaccbaa11','', '','','1','1');
> UPSERT INTO TAB_PS_XDR VALUES('dDaaaadcbaa11','', '','','1','1');
> after insert data,  i check the number of rows:
> select count(*) from tab_px_xdr ; 
> the result is no change.
> and then change my sql like this:
> UPSERT INTO TAB_PS_XDR VALUES('aaaaaaacbaa11','', '','1','','1');
> UPSERT INTO TAB_PS_XDR VALUES('bbaaaabbaa11','', '','1','','1');
> UPSERT INTO TAB_PS_XDR VALUES('ccaaaaccbaa11','', '','1','','1');
> UPSERT INTO TAB_PS_XDR VALUES('dDaaaadcbaa11','', '','1','','1');
> check the result is ok. 
> why??



--
This message was sent by Atlassian JIRA
(v6.2#6252)