org.apache.hadoop.hive.ql.lib
Class Utils

java.lang.Object
  extended by org.apache.hadoop.hive.ql.lib.Utils

public class Utils
extends Object

Contains common utility functions to manipulate nodes, walkers etc.


Constructor Summary
Utils()
           
 
Method Summary
static Node getNthAncestor(Stack<Node> st, int n)
          Gets the nth ancestor (the parent being the 1st ancestor) in the traversal path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

getNthAncestor

public static Node getNthAncestor(Stack<Node> st,
                                  int n)
Gets the nth ancestor (the parent being the 1st ancestor) in the traversal path. n=0 returns the currently visited node.

Parameters:
st - The stack that encodes the traversal path.
n - The value of n (n=0 is the currently visited node).
Returns:
Node The Nth ancestor in the path with respect to the current node.


Copyright © 2013 The Apache Software Foundation