org.apache.hadoop.hive.ql.parse
Class ParseUtils

java.lang.Object
  extended by org.apache.hadoop.hive.ql.parse.ParseUtils

public final class ParseUtils
extends Object

Library of utility functions used in the parse code.


Method Summary
static ASTNode findRootNonNullToken(ASTNode tree)
          Performs a descent of the leftmost branch of a tree, stopping when either a node with a non-null token is found or the leaf level is encountered.
static CharTypeInfo getCharTypeInfo(ASTNode node)
           
static DecimalTypeInfo getDecimalTypeTypeInfo(ASTNode node)
           
static VarcharTypeInfo getVarcharTypeInfo(ASTNode node)
           
static boolean isJoinToken(ASTNode node)
          Tests whether the parse tree node is a join token.
static List<String> validateColumnNameUniqueness(List<org.apache.hadoop.hive.metastore.api.FieldSchema> fieldSchemas)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isJoinToken

public static boolean isJoinToken(ASTNode node)
Tests whether the parse tree node is a join token.

Parameters:
node - The parse tree node
Returns:
boolean

findRootNonNullToken

public static ASTNode findRootNonNullToken(ASTNode tree)
Performs a descent of the leftmost branch of a tree, stopping when either a node with a non-null token is found or the leaf level is encountered.

Parameters:
tree - candidate node from which to start searching
Returns:
node at which descent stopped

validateColumnNameUniqueness

public static List<String> validateColumnNameUniqueness(List<org.apache.hadoop.hive.metastore.api.FieldSchema> fieldSchemas)
                                                 throws SemanticException
Throws:
SemanticException

getVarcharTypeInfo

public static VarcharTypeInfo getVarcharTypeInfo(ASTNode node)
                                          throws SemanticException
Throws:
SemanticException

getCharTypeInfo

public static CharTypeInfo getCharTypeInfo(ASTNode node)
                                    throws SemanticException
Throws:
SemanticException

getDecimalTypeTypeInfo

public static DecimalTypeInfo getDecimalTypeTypeInfo(ASTNode node)
                                              throws SemanticException
Throws:
SemanticException


Copyright © 2014 The Apache Software Foundation. All rights reserved.