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

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

public class ParseDriver
extends Object

ParseDriver.


Nested Class Summary
 class ParseDriver.ANTLRNoCaseStringStream
          ANTLRNoCaseStringStream.
 class ParseDriver.HiveLexerX
          HiveLexerX.
 
Field Summary
static org.antlr.runtime.tree.TreeAdaptor adaptor
          Tree adaptor for making antlr return ASTNodes instead of CommonTree nodes so that the graph walking algorithms and the rules framework defined in ql.lib can be used with the AST Nodes.
 
Constructor Summary
ParseDriver()
           
 
Method Summary
 ASTNode parse(String command)
           
 ASTNode parse(String command, Context ctx)
           
 ASTNode parse(String command, Context ctx, boolean setTokenRewriteStream)
          Parses a command, optionally assigning the parser's token stream to the given context.
 ASTNode parseSelect(String command, Context ctx)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

adaptor

public static final org.antlr.runtime.tree.TreeAdaptor adaptor
Tree adaptor for making antlr return ASTNodes instead of CommonTree nodes so that the graph walking algorithms and the rules framework defined in ql.lib can be used with the AST Nodes.

Constructor Detail

ParseDriver

public ParseDriver()
Method Detail

parse

public ASTNode parse(String command)
              throws ParseException
Throws:
ParseException

parse

public ASTNode parse(String command,
                     Context ctx)
              throws ParseException
Throws:
ParseException

parse

public ASTNode parse(String command,
                     Context ctx,
                     boolean setTokenRewriteStream)
              throws ParseException
Parses a command, optionally assigning the parser's token stream to the given context.

Parameters:
command - command to parse
ctx - context with which to associate this parser's token stream, or null if either no context is available or the context already has an existing stream
Returns:
parsed AST
Throws:
ParseException

parseSelect

public ASTNode parseSelect(String command,
                           Context ctx)
                    throws ParseException
Throws:
ParseException


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