You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/07/13 08:52:20 UTC

[GitHub] [hive] pudidic opened a new pull request, #3434: [WIP] HIVE-1626: stop using java.util.Stack

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

   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?
   This PR replaces Stack with ArrayStack, which is a non-sychronized version of Stack, for faster performance.
   
   ### Why are the changes needed?
   ArrayStack has a same API with Stack, but without synchronized keyword. It uses an internal ArrayList to keep elements.
    * All Stack<Node> method parameters were replaced with ArrayStack<Node>.
    * pop(), push(Object), peek(), get(int) methods work exactly same with Stack. Their callers don't need to be changed.
    * indexOf(Object) is not implemented. It's used by only one caller and indexOf(Object) method was moved into that caller.
    * empty() method was replaced by isEmpty() method, which is in the Collection interface. Its callers were changed.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   It'll be tested by the integration test server.


-- 
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-unsubscribe@hive.apache.org

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


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


[GitHub] [hive] pudidic closed pull request #3434: [WIP] HIVE-1626: stop using java.util.Stack

Posted by GitBox <gi...@apache.org>.
pudidic closed pull request #3434: [WIP] HIVE-1626: stop using java.util.Stack
URL: https://github.com/apache/hive/pull/3434


-- 
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-unsubscribe@hive.apache.org

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


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