Package org.apache.tajo.engine.planner

Examples of org.apache.tajo.engine.planner.PlanningException


  private static Target[] getRawTargets(String query) throws PlanningException {
    Expr expr = analyzer.parse(query);
    LogicalPlan plan = planner.createPlan(expr);
    Target [] targets = plan.getRootBlock().getTargetListManager().getUnresolvedTargets();
    if (targets == null) {
      throw new PlanningException("Wrong query statement or query plan: " + query);
    }
    for (Target t : targets) {
      assertJsonSerDer(t.getEvalTree());
    }
    return targets;
View Full Code Here


          totalVolume += summary.getLength();
          totalVolume += summary.getFileCount();
        }
        scanNode.getTableDesc().getStats().setNumBytes(totalVolume);
      } catch (IOException e) {
        throw new PlanningException(e);
      }
    }
  }
View Full Code Here

          block.setRoot(rewrittenScanNode);
        } else {
          PlannerUtil.replaceNode(plan, stack.peek(), scanNode, rewrittenScanNode);
        }
      } catch (IOException e) {
        throw new PlanningException("Partitioned Table Rewrite Failed: \n" + e.getMessage());
      }
      return null;
    }
View Full Code Here

      if (namedExprsMgr.isAliasedName(leftExpr.getSimpleName())) {
        String columnName = namedExprsMgr.getOriginalName(leftExpr.getSimpleName());
        String qualifier = CatalogUtil.extractQualifier(columnName);
        relationNames[0] = qualifier;
      } else {
        throw new PlanningException("Cannot expect a referenced relation: " + leftExpr);
      }
    }

    if (rightExpr.hasQualifier()) {
      relationNames[1] = rightExpr.getQualifier();
    } else {
      if (namedExprsMgr.isAliasedName(rightExpr.getSimpleName())) {
        String columnName = namedExprsMgr.getOriginalName(rightExpr.getSimpleName());
        String qualifier = CatalogUtil.extractQualifier(columnName);
        relationNames[1] = qualifier;
      } else {
        throw new PlanningException("Cannot expect a referenced relation: " + rightExpr);
      }
    }

    return relationNames;
  }
View Full Code Here

TOP

Related Classes of org.apache.tajo.engine.planner.PlanningException

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.