[
https://issues.apache.org/jira/browse/IMPALA-2066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tim Armstrong resolved IMPALA-2066.
-----------------------------------
Resolution: Later
> Traverse expression trees iteratively
> -------------------------------------
>
> Key: IMPALA-2066
> URL: https://issues.apache.org/jira/browse/IMPALA-2066
> Project: IMPALA
> Issue Type: Improvement
> Components: Frontend
> Affects Versions: Impala 2.2
> Reporter: Henry Robinson
> Priority: Minor
>
> In several places, for example in {{Expr.analyze()}} in the frontend, we
> recursively traverse trees of expression objects. Doing so puts us at risk of
> blowing through the stack limit, and therefore having a much lower limit on
> the number of expressions than memory would actually allow (this is not just
> a theoretical improvement - users have been bumping up against this limit).
> We should transform our tree-walking code to iteratively traverse the exprs.
> For example, {{analyze()}} could be transformed into a post-order iterative
> traversal. Then the expr tree size is bounded by the size of stack we can
> reasonably allocate, which will be much larger than the call stack.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)