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 2016/01/24 02:53:39 UTC

[jira] [Updated] (PHOENIX-1714) WHERE part for CREATE VIEW ... AS SELECT ... does not work for the quoted CF

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

James Taylor updated PHOENIX-1714:
----------------------------------
    Fix Version/s: 4.8.0

> WHERE part for CREATE VIEW ... AS SELECT ... does not work for the quoted CF
> ----------------------------------------------------------------------------
>
>                 Key: PHOENIX-1714
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1714
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Serhiy Bilousov
>            Priority: Critical
>             Fix For: 4.8.0
>
>
> I was trying to build some views on top of HBase table but have very little luck with where part I would like to put inside the view. 
> in HBase shell
> {noformat} 
> disable 't1'
> drop 't1'
> create 't1', {NAME => 'f1'}
> put 't1','r1','f1:B','r1f1b'
> put 't1','r1','f1:C','r1f1c'
> put 't1','r2','f1:C','r2f1c'
> put 't1','r3','f1:D','r3f1d'
> scan 't1'
> {noformat} 
> in sqlline
> {noformat} 
> DROP VIEW IF EXISTS dev.v_t1; 
> create view dev.v_t1(a VARCHAR PRIMARY KEY, "f1".b VARCHAR, "f1".c VARCHAR, "f1".d VARCHAR) 
> as select * from "t1" ;
> select * from dev.v_t1;
> +-----------+-----------+-------------+-------------+
> |      A    |        B  |         C   |         D   |
> +-----------+-----------+-------------+-------------+
> | r1        | r1f1b     | r1f1c       | null        |
> | r2        | null      | r2f1c       | null        |
> | r3        | null      | null        | r3f1d       |
> +-----------+-----------+-------------+-------------+
> 3 rows selected (0.201 seconds)
> DROP VIEW IF EXISTS dev.v_t1_b; 
> create view dev.v_t1_b(a VARCHAR PRIMARY KEY, "f1".b VARCHAR) 
> as select * from "t1" where "f1".b IS NOT NULL;
> select * from dev.v_t1_b;
> Error: ERROR 1001 (42I01): Undefined column family. familyName=F1.null (state=42I01,code=1001)
> {noformat} 
> It seems working as expected with unquoted CF. (HBase table created with all capital letters) but it's not my case.



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