[
https://issues.apache.org/jira/browse/PHOENIX-1854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15114091#comment-15114091
]
James Taylor commented on PHOENIX-1854:
---------------------------------------
Is this necessary, [~maryannxue]? If not, please close.
> Investigate not setting ProjectedColumnExpression in TupleProjector
> expressions array
> -------------------------------------------------------------------------------------
>
> Key: PHOENIX-1854
> URL: https://issues.apache.org/jira/browse/PHOENIX-1854
> Project: Phoenix
> Issue Type: Improvement
> Reporter: James Taylor
> Assignee: Maryann Xue
> Priority: Minor
> Fix For: 4.8.0
>
>
> 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)