ParseContext parseCtx = querySem.getParseContext(); for (Map.Entry<String, TableScanOperator> topOpMap : querySem.getParseContext().getTopOps() .entrySet()) { TableScanOperator tableScanOp = topOpMap.getValue();
ParseContext parseCtx = querySem.getParseContext(); for (Map.Entry<String, TableScanOperator> topOpMap : querySem.getParseContext().getTopOps() .entrySet()) { TableScanOperator tableScanOp = topOpMap.getValue();
/** * 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; }
QB qb = new QB(null, null, false); ASTNode child = ast; ParseContext subPCtx = ((SemanticAnalyzer) sem).getParseContext(); subPCtx.setContext(ctx); ((SemanticAnalyzer) sem).initParseCtx(subPCtx);
ExplainConfiguration config = new ExplainConfiguration(); config.setExtended(true); ExplainWork work = new ExplainWork(tmp, sem.getParseContext(), sem.getRootTasks(), sem.getFetchTask(), null, sem, config, null, plan.getOptimizedQueryString(), null); ExplainTask task = new ExplainTask();
ParseContext subPCtx = sem.getParseContext(); subPCtx.setContext(ctx); sem.initParseCtx(subPCtx);
pCtx = ((SemanticAnalyzer)sem).getParseContext();
pCtx = ((SemanticAnalyzer)sem).getParseContext();
|| op.equals(HiveOperation.QUERY)) { SemanticAnalyzer querySem = (SemanticAnalyzer) sem; ParseContext parseCtx = querySem.getParseContext(); .getParseContext().getTopOps().entrySet()) { Operator<? extends OperatorDesc> topOp = topOpMap.getValue(); if (topOp instanceof TableScanOperator) {
conf, new HashMap<Operator<? extends Serializable>, Task<? extends Serializable>>(), new ArrayList<Operator<? extends Serializable>>(), getParseContext(), mvTask, rootTasks, new LinkedHashMap<Operator<? extends Serializable>, GenMapRedCtx>(), getParseContext(), ctx, rootTasks, fetchTask); PhysicalOptimizer physicalOptimizer = new PhysicalOptimizer( physicalContext, conf);
|| op.equals(HiveOperation.QUERY)) { SemanticAnalyzer querySem = (SemanticAnalyzer) sem; ParseContext parseCtx = querySem.getParseContext(); Map<TableScanOperator, Table> tsoTopMap = parseCtx.getTopToTable(); .getParseContext().getTopOps().entrySet()) { Operator<? extends Serializable> topOp = topOpMap.getValue(); if (topOp instanceof TableScanOperator
/** * 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; }
pCtx = ((SemanticAnalyzer)sem).getParseContext();