public void getMetaData(QB qb) throws SemanticException { getMetaData(qb, false); }
public void getMetaData(QB qb) throws SemanticException { getMetaData(qb, false); }
private void getMetaData(QBExpr qbexpr, ReadEntity parentInput) throws HiveException { if (qbexpr.getOpcode() == QBExpr.Opcode.NULLOP) { getMetaData(qbexpr.getQB(), parentInput); } else { getMetaData(qbexpr.getQBExpr1(), parentInput); getMetaData(qbexpr.getQBExpr2(), parentInput); } }
private void getMetaData(QBExpr qbexpr, ReadEntity parentInput) throws HiveException { if (qbexpr.getOpcode() == QBExpr.Opcode.NULLOP) { getMetaData(qbexpr.getQB(), parentInput); } else { getMetaData(qbexpr.getQBExpr1(), parentInput); getMetaData(qbexpr.getQBExpr2(), parentInput); } }
public void getMetaData(QB qb, boolean enableMaterialization) throws SemanticException { try { if (enableMaterialization) { getMaterializationMetadata(qb); } getMetaData(qb, null); } catch (HiveException e) { if (e instanceof SemanticException) { throw (SemanticException)e; } throw new SemanticException(e.getMessage(), e); } }
public void getMetaData(QB qb, boolean enableMaterialization) throws SemanticException { try { if (enableMaterialization) { getMaterializationMetadata(qb); } getMetaData(qb, null); } catch (HiveException e) { // Has to use full name to make sure it does not conflict with // org.apache.commons.lang.StringUtils LOG.error(org.apache.hadoop.util.StringUtils.stringifyException(e)); if (e instanceof SemanticException) { throw (SemanticException)e; } throw new SemanticException(e.getMessage(), e); } }
/** * For the input ASTNode tree, perform a semantic analysis and check metadata * Generate a operator tree and return it. * * @param ctx * @param sem * @param ast * @return * @throws SemanticException */ private static Operator<?> doSemanticAnalysis(SemanticAnalyzer sem, ASTNode ast, Context ctx) throws SemanticException { QB qb = new QB(null, null, false); ASTNode child = ast; ParseContext subPCtx = sem.getParseContext(); subPCtx.setContext(ctx); sem.initParseCtx(subPCtx); LOG.info("Starting Sub-query Semantic Analysis"); sem.doPhase1(child, qb, sem.initPhase1Ctx(), null); LOG.info("Completed phase 1 of Sub-query Semantic Analysis"); sem.getMetaData(qb); LOG.info("Completed getting MetaData in Sub-query Semantic Analysis"); LOG.info("Sub-query Abstract syntax tree: " + ast.toStringTree()); Operator<?> operator = sem.genPlan(qb); LOG.info("Sub-query Completed plan generation"); return operator; }
private Operator genPlanForSubQueryPredicate( QB qbSQ, ISubQueryJoinInfo subQueryPredicate) throws SemanticException { qbSQ.setSubQueryDef(subQueryPredicate.getSubQuery()); Phase1Ctx ctx_1 = initPhase1Ctx(); doPhase1(subQueryPredicate.getSubQueryAST(), qbSQ, ctx_1, null); getMetaData(qbSQ); Operator op = genPlan(qbSQ); return op; }
private Operator genPlanForSubQueryPredicate( QB qbSQ, ISubQueryJoinInfo subQueryPredicate) throws SemanticException { qbSQ.setSubQueryDef(subQueryPredicate.getSubQuery()); Phase1Ctx ctx_1 = initPhase1Ctx(); doPhase1(subQueryPredicate.getSubQueryAST(), qbSQ, ctx_1, null); getMetaData(qbSQ); Operator op = genPlan(qbSQ); return op; }
sem.getMetaData(qb); Operator<?> operator = sem.genPlan(qb);
sem.getMetaData(qb); sem.genPlan(qb);
getMetaData(qb, createVwDesc == null); LOG.info("Completed getting MetaData in Semantic Analysis");
getMetaData(qb, createVwDesc == null); LOG.info("Completed getting MetaData in Semantic Analysis");
getMetaData(qbexpr, newParentInput); if (wasView) { viewsExpanded.remove(viewsExpanded.size() - 1);
getMetaData(qbexpr, newParentInput); if (wasView) { viewsExpanded.remove(viewsExpanded.size() - 1);
public void getMetaData(QB qb) throws SemanticException { getMetaData(qb, null); }
private void getMetaData(QBExpr qbexpr, ReadEntity parentInput) throws SemanticException { if (qbexpr.getOpcode() == QBExpr.Opcode.NULLOP) { getMetaData(qbexpr.getQB(), parentInput); } else { getMetaData(qbexpr.getQBExpr1(), parentInput); getMetaData(qbexpr.getQBExpr2(), parentInput); } }
private void getMetaData(QBExpr qbexpr) throws SemanticException { if (qbexpr.getOpcode() == QBExpr.Opcode.NULLOP) { getMetaData(qbexpr.getQB()); } else { getMetaData(qbexpr.getQBExpr1()); getMetaData(qbexpr.getQBExpr2()); } }
private Operator genPlanForSubQueryPredicate( QB qbSQ, ISubQueryJoinInfo subQueryPredicate) throws SemanticException { qbSQ.setSubQueryDef(subQueryPredicate.getSubQuery()); Phase1Ctx ctx_1 = initPhase1Ctx(); doPhase1(subQueryPredicate.getSubQueryAST(), qbSQ, ctx_1, null); getMetaData(qbSQ); Operator op = genPlan(qbSQ); return op; }
/** * For the input ASTNode tree, perform a semantic analysis and check metadata * Generate a operator tree and return it. * * @param ctx * @param sem * @param ast * @return * @throws SemanticException */ private static Operator<?> doSemanticAnalysis(SemanticAnalyzer sem, ASTNode ast, Context ctx) throws SemanticException { QB qb = new QB(null, null, false); ASTNode child = ast; ParseContext subPCtx = ((SemanticAnalyzer) sem).getParseContext(); subPCtx.setContext(ctx); ((SemanticAnalyzer) sem).initParseCtx(subPCtx); LOG.info("Starting Sub-query Semantic Analysis"); sem.doPhase1(child, qb, sem.initPhase1Ctx(), null); LOG.info("Completed phase 1 of Sub-query Semantic Analysis"); sem.getMetaData(qb); LOG.info("Completed getting MetaData in Sub-query Semantic Analysis"); LOG.info("Sub-query Abstract syntax tree: " + ast.toStringTree()); Operator<?> operator = sem.genPlan(qb); LOG.info("Sub-query Completed plan generation"); return operator; }