Package org.apache.hadoop.hive.ql.parse

Examples of org.apache.hadoop.hive.ql.parse.ParseDriver


     * @return the AST
     * @throws IOException if failed
     * @throws ParseException if failed
     */
    protected ASTNode verify(String ql) throws IOException, ParseException {
        ASTNode node = new ParseDriver().parse(ql);
        return node;
    }
View Full Code Here


        StringBuilder buf = new StringBuilder();
        HiveQlEmitter.emit(stmt, buf);
        String ql = buf.toString();
        System.out.println("====");
        System.out.println(ql);
        ASTNode node = new ParseDriver().parse(ql);
        return node;
    }
View Full Code Here

      SemanticException {

    /*
     * Get the AST tree
     */
    ParseDriver pd = new ParseDriver();
    ASTNode tree = pd.parse(query);

    while ((tree.getToken() == null) && (tree.getChildCount() > 0)) {
      tree = (ASTNode) tree.getChild(0);
    }

View Full Code Here

    try {
      command = new VariableSubstitution().substitute(conf,command);
      ctx = new Context(conf);

      ParseDriver pd = new ParseDriver();
      ASTNode tree = pd.parse(command, ctx);
      tree = ParseUtils.findRootNonNullToken(tree);

      BaseSemanticAnalyzer sem = SemanticAnalyzerFactory.get(conf, tree);
      String hookName = HiveConf.getVar(conf, ConfVars.SEMANTIC_ANALYZER_HOOK);
View Full Code Here

    SessionState.start(conf);
    db = Hive.get(conf);
    fs = FileSystem.get(conf);
    drv = new Driver(conf);
    drv.init();
    pd = new ParseDriver();
    sem = new SemanticAnalyzer(conf);
  }
View Full Code Here

    return pd.parse(qMap.get(tname));
  }

  public void resetParser() throws SemanticException {
    drv.init();
    pd = new ParseDriver();
    sem = new SemanticAnalyzer(conf);
  }
View Full Code Here

  public void getLineageInfo(String query) throws ParseException, SemanticException {

    /*
     *  Get the AST tree
     */
    ParseDriver pd = new ParseDriver();
    ASTNode tree = pd.parse(query);

    while ((tree.getToken() == null) && (tree.getChildCount() > 0)) {
      tree = (ASTNode) tree.getChild(0);
    }

View Full Code Here

      if (SessionState.get() != null)
        SessionState.get().getHiveHistory().startQuery(command, conf.getVar(HiveConf.ConfVars.HIVEQUERYID) );

      resStream = null;

      pd = new ParseDriver();
      ASTNode tree = pd.parse(command);

      while ((tree.getToken() == null) && (tree.getChildCount() > 0)) {
        tree = (ASTNode) tree.getChild(0);
      }
View Full Code Here

    // System.out.flush();
   
    db = Hive.get(conf);
    fs = FileSystem.get(conf);
    drv = new Driver(conf);
    pd = new ParseDriver();
    sem = new SemanticAnalyzer(conf);
  }
View Full Code Here

      ctx.setTryCount(getTryCount());
      ctx.setCmd(command);
      ctx.setHDFSCleanup(true);

      perfLogger.PerfLogBegin(LOG, PerfLogger.PARSE);
      ParseDriver pd = new ParseDriver();
      ASTNode tree = pd.parse(command, ctx);
      tree = ParseUtils.findRootNonNullToken(tree);
      perfLogger.PerfLogEnd(LOG, PerfLogger.PARSE);

      perfLogger.PerfLogBegin(LOG, PerfLogger.ANALYZE);
      BaseSemanticAnalyzer sem = SemanticAnalyzerFactory.get(conf, tree);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.parse.ParseDriver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.