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

Thomas D'Silva commented on PHOENIX-2088:
-----------------------------------------

[~jmahonin] the List< ColumnInfo> is still required.  The problem is if you 
create an index on an expression that has characters which are also used as 
delimiters then the deserialization fails (see the modified test attached to 
this patch). I modified the code to always create the List<ColumnInfo> from the 
list of columns that are passed in, but this also has issues since the column 
name can contain any character (if its an expression). 

{code}
final Connection connection = ConnectionUtil.getInputConnection(configuration);
final List<String> selectColumnList = getSelectColumnList(configuration);
final List<ColumnInfo> columnMetadataList = 
PhoenixRuntime.generateColumnInfo(connection, tableName, selectColumnList);
{code}

[~jamestaylor]
Should we just figure out a better way of serializing the list of names and 
column infos?


> Prevent splitting and recombining select expressions for MR integration
> -----------------------------------------------------------------------
>
>                 Key: PHOENIX-2088
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2088
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: Thomas D'Silva
>         Attachments: PHOENIX-2088-wip.patch
>
>
> We currently send in the select expressions for the MR integration with a 
> delimiter separated string, split based on the delimiter, and then recombine 
> again using a comma separator. This is problematic because the delimiter 
> character may appear in a select expression, thus breaking this logic. 
> Instead, we should use a comma as the delimiter and avoid splitting and 
> recombining as it's not necessary in that case. Instead, the entire string 
> can be used as-is in that case to form the select expressions.



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

Reply via email to