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

Prasanth Jayachandran edited comment on HIVE-11281 at 7/16/15 5:53 PM:
-----------------------------------------------------------------------

nits:
Shouldn't the following code come after buf.append(t.toStringTree()); to avoid 
double space appends
{code}
if ( i>0 ) {
  buf.append(' ');
}
{code}

Rename str to astStr or something more relevant?


was (Author: prasanth_j):
nits:
Shouldn't the following code come after buf.append(t.toStringTree()); to avoid 
double space appends
{code}
buf.append(t.toStringTree());
{code}

Rename str to astStr or something more relevant?

> Memoize toStringTree() for ASTNode
> ----------------------------------
>
>                 Key: HIVE-11281
>                 URL: https://issues.apache.org/jira/browse/HIVE-11281
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Planning
>    Affects Versions: 1.0.0, 1.2.0, 1.1.0
>            Reporter: Ashutosh Chauhan
>            Assignee: Ashutosh Chauhan
>         Attachments: HIVE-11281.patch
>
>
> Currently it defaults to BaseTree::toStringTree() which always computes it 
> recursively. For very large trees it becomes expensive. On one particular 
> test query compilation time went down from 55 seconds to 2 seconds.



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

Reply via email to