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

Dmitriy V. Ryaboy commented on PIG-1946:
----------------------------------------

Spaces are legal:


hbase(main):011:0> put 'dropme', 'id1', 'columns:foo bar', 'value'
0 row(s) in 0.0060 seconds

hbase(main):012:0> scan 'dropme'
ROW                                           COLUMN+CELL                       
                                                                                
                   
 id1                                          column=columns:foo bar, 
timestamp=1307395400107, value=value                

So I think that means 2 flags are needed: -d (delimiter, space by default) and 
-ignoreTrailingCommas (true by default, turn off to force trailing commas to be 
treated as part of the column name)

> HBaseStorage constructor syntax is error prone
> ----------------------------------------------
>
>                 Key: PIG-1946
>                 URL: https://issues.apache.org/jira/browse/PIG-1946
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Bill Graham
>            Assignee: Bill Graham
>             Fix For: 0.10
>
>         Attachments: PIG-1946_1.patch
>
>
> Using {{HBaseStorage}} like so seems like a reasonable thing to do, but it 
> will yield unexpected results:
> {code}
> STORE result INTO 'hbase://foo' USING
>  org.apache.pig.backend.hadoop.hbase.HBaseStorage(
>  'info:first_name, info:last_name');
> {code}
> The problem us that a column named {{info:first_name,}} will be created, with 
> the trailing comma included. I've had numerous developers get tripped up on 
> this issue since everywhere else in Pig variables are separated by commas, so 
> I propose we fix it.
> I propose we trim leading/trailing commas from column names, but I'm open to 
> other ideas.
> Also should we accept column names that are comman-delimited without spaces?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to