[
https://issues.apache.org/jira/browse/HIVE-20255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16593364#comment-16593364
]
Zoltan Haindrich commented on HIVE-20255:
-----------------------------------------
[~belugabehr] this patch makes the apidoc unreadable:
{code}
/**
- * This is a level-wise walker implementation which dispatches the node in the
order
- * that the node will only get dispatched after all the parents are dispatched.
+ * This is a level-wise walker implementation which dispatches the node in the
+ * order that the node will only get dispatched after all the parents are
+ * dispatched.
*
* Each node will be accessed once while it could be dispatched multiple times.
* e.g., for a lineage generator with operator tree, 2 levels of current node's
- * ancestors need to keep in the operator stack.
- * FIL(2) FIL(4)
- * | |
- * RS(3) RS(5)
- * \ /
- * JOIN(7)
- * The join lineage needs to be called twice for JOIN(7) node with different
operator
- * ancestors.
+ * ancestors need to keep in the operator stack. FIL(2) FIL(4) | | RS(3) RS(5)
\
+ * / JOIN(7) The join lineage needs to be called twice for JOIN(7) node with
+ * different operator ancestors.
{code}
> Review LevelOrderWalker.java
> ----------------------------
>
> Key: HIVE-20255
> URL: https://issues.apache.org/jira/browse/HIVE-20255
> Project: Hive
> Issue Type: Improvement
> Components: Query Planning
> Affects Versions: 3.0.0, 4.0.0
> Reporter: BELUGA BEHR
> Assignee: BELUGA BEHR
> Priority: Minor
> Attachments: HIVE-20255.1.patch, HIVE-20255.2.patch,
> HIVE-20255.3.patch
>
>
> https://github.com/apache/hive/blob/6d890faf22fd1ede3658a5eed097476eab3c67e9/ql/src/java/org/apache/hadoop/hive/ql/lib/LevelOrderWalker.java
> * Make code more concise
> * Fix some check style issues
> {code}
> if (toWalk.get(index).getChildren() != null) {
> for(Node child : toWalk.get(index).getChildren()) {
> {code}
> Actually, the underlying implementation of {{getChildren()}} has to do some
> real work, so do not throw away the work after checking for null. Simply
> call once and store the results.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)