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

Bill Graham commented on PIG-1946:
----------------------------------

Eric, the syntax you show is the current syntax - the tokens are split on space 
to get the columns. Hence the issue when there are also commas in the mix. In 
addition to supporting the current syntax of:

{code}
'info:first_name info:last_name'
{code}

I propose we also support these variations:
{code}
'info:first_name info:last_name'
'info:first_name,info:last_name'
'info:first_name, info:last_name'
{code}

Only downside is that we wouldn't be backward compatible with a user who has 
column names with commas in them. This seems to me like an odd thing to do, but 
who knows. 

Anyone think we need to support column names with commas in them?



> 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
>
> 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