James Taylor created PHOENIX-1854:
-------------------------------------
Summary: Investigate setting of ProjectedColumnExpression in
TupleProjector expressions array
Key: PHOENIX-1854
URL: https://issues.apache.org/jira/browse/PHOENIX-1854
Project: Phoenix
Issue Type: Bug
Reporter: James Taylor
In implementing PHOENIX-1826, on the visit of a ProjectedColumnExpression, we
dereference the TupleProjector expressions array and continue the visit on the
expression. To prevent a stack overflow due to infinite recursion, we detect
the case when the dereferenced ProjectedColumnExpression is the same as the
expression being visited and do not continue the traversal. See FIXME in
OrderPreservingTracker.TrackOrderPreservingExpressionVisitor:
{code}
@Override
public Info visit(ProjectedColumnExpression node) {
if (projector == null) {
return super.visit(node);
}
Expression expression =
projector.getExpressions()[node.getPosition()];
// FIXME: prevents infinite recursion for union all in subquery, but
// should a ProjectedColumnExpression be used in this case? Wouldn't
// it make more sense to not create this wrapper in this case?
if (expression == node) {
return super.visit(node);
}
return expression.accept(this);
}
{code}
It's possible that this wrapping is not necessary in the first place.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)