public final class ParseUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static ExprNodeDesc |
createConversionCast(ExprNodeDesc column,
PrimitiveTypeInfo tableFieldTypeInfo) |
static String |
ensureClassExists(String className) |
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<FieldSchema> fieldSchemas) |
public static boolean isJoinToken(ASTNode node)
node - The parse tree nodepublic static ASTNode findRootNonNullToken(ASTNode tree)
tree - candidate node from which to start searchingpublic static List<String> validateColumnNameUniqueness(List<FieldSchema> fieldSchemas) throws SemanticException
SemanticExceptionpublic static ExprNodeDesc createConversionCast(ExprNodeDesc column, PrimitiveTypeInfo tableFieldTypeInfo) throws SemanticException
column - column expression to converttableFieldTypeInfo - TypeInfo to convert toSemanticExceptionpublic static VarcharTypeInfo getVarcharTypeInfo(ASTNode node) throws SemanticException
SemanticExceptionpublic static CharTypeInfo getCharTypeInfo(ASTNode node) throws SemanticException
SemanticExceptionpublic static DecimalTypeInfo getDecimalTypeTypeInfo(ASTNode node) throws SemanticException
SemanticExceptionpublic static String ensureClassExists(String className) throws SemanticException
SemanticExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.