pudidic opened a new pull request, #3441:
URL: https://github.com/apache/hive/pull/3441

   We currently use Stack as part of the generic node walking library. Stack 
should not be used for this since its inheritance from Vector incurs 
superfluous synchronization overhead. ArrayStack is implemented to replace 
Stack.
   
   ### What changes were proposed in this pull request?
   * Stack<Node> calls were replaced with ArrayStack<Node>.
   * ArrayStack has same pop, push, peek methods as Stack without 
synchronization.
   * LevelOrderWalker uses an extended ArrayStack that allows add(0, element) 
and remove(0).
   * Stack#empty was replaced with ArrayStack#isEmpty.
   
   ### Why are the changes needed?
   * Stack was used in query planning, but it's very slow because of 
synchronization overhead.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   * All existing tests passed on 
http://ci.hive.apache.org/blue/organizations/jenkins/hive-precommit/detail/PR-3434/4/pipeline/628/.
   * ArrayStackTest was added to test whether ArrayStack work same as Stack.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to