[
https://issues.apache.org/jira/browse/PHOENIX-2160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14704133#comment-14704133
]
James Taylor commented on PHOENIX-2160:
---------------------------------------
You'd want to change it to find ProjectedColumnExpression instead, so something
like this:
{code}
/**
*
* Implementation of ExpressionVisitor where only KeyValueDataAccessor
* is being visited
*
*
* @since 0.1
*/
public abstract class ProjectedColumnExpressionVisitor extends
StatelessTraverseAllExpressionVisitor<Void> {
@Override
abstract public Void visit(ProjectedColumnExpression node);
}
final List<KeyValueColumnExpression> indexKVs = Lists.newArrayList();
// Create anon visitor to find reference to array in a generic
way
children.get(0).accept(new ProjectedColumnExpressionVisitor() {
@Override
public Void visit(ProjectedColumnExpression expression) {
if (expression.getDataType().isArrayType()) {
indexKVs.add(expression);
}
return null;
}
});
{code}
Make sure you have a unit test where the ARRAY is used in the primary key
constraint, but I think the above will work.
> Projection of specific array index does not work
> ------------------------------------------------
>
> Key: PHOENIX-2160
> URL: https://issues.apache.org/jira/browse/PHOENIX-2160
> Project: Phoenix
> Issue Type: Bug
> Reporter: ramkrishna.s.vasudevan
> Assignee: ramkrishna.s.vasudevan
>
> PHOENIX-10 that allowed projection of specific array index does not work now.
> Was looking into the code for some thing and found this issue. Let me know if
> am missing something.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)