Examples of PartitionDef


Examples of com.sap.hadoop.windowing.query2.definition.PartitionDef

    throws WindowingException
  {
    WindowDef tWindow = tFnDef.getWindow();
    WindowDef fWindow = wFnDef.getWindow();
   
    PartitionDef tPart = tWindow == null ? null : tWindow.getPartDef();
    PartitionDef fPart = fWindow == null ? null : fWindow.getPartDef();
   
    if ( !TranslateUtils.isCompatible(tPart, fPart))
    {
      throw new WindowingException(
          sprintf("Window Function '%s' has an incompatible partition clause", wFnDef.getSpec()));
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.definition.PartitionDef

    qdw.walk(qDef);
  }

  protected void setupKeysWrapper(ObjectInspector inputOI) throws HiveException
  {
    PartitionDef pDef = RuntimeUtils.getFirstTableFunction(qDef).getWindow().getPartDef();
    ArrayList<ColumnDef> cols = pDef.getColumns();
    int numCols = cols.size();
    ExprNodeEvaluator[] keyFields = new ExprNodeEvaluator[numCols];
    ObjectInspector[] keyOIs = new ObjectInspector[numCols];
    ObjectInspector[] currentKeyOIs = new ObjectInspector[numCols];
   
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.definition.PartitionDef

   */
  protected void walk(WindowDef window) throws WindowingException
  {
    if ( window == null ) return;
   
    PartitionDef pDef = window.getPartDef();
    if(pDef != null){
      ArrayList<ColumnDef> cols = pDef.getColumns();
      for(ColumnDef col : cols)
      {
        visitor.visit(col);
      }
      visitor.visit(pDef);
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.definition.PartitionDef

    wDef = new WindowDef(wSpec);
   
    PartitionSpec pSpec = wSpec.getPartition();
    OrderSpec oSpec = wSpec.getOrder();
    WindowFrameSpec wFrameSpec = wSpec.getWindow();
    PartitionDef pDef = translatePartition(qDef, iInfo, pSpec);
    OrderDef oDef = translateOrder(qDef, inputDesc, iInfo, oSpec, pDef);
    WindowFrameDef wdwDef = translateWindowFrame(qDef, wFrameSpec, iInfo);
   
    wDef.setPartDef(pDef);
    wDef.setOrderDef(oDef);
View Full Code Here

Examples of com.sap.hadoop.windowing.query2.definition.PartitionDef

  static PartitionDef translatePartition(QueryDef qDef, InputInfo iInfo, PartitionSpec spec) throws WindowingException
  {
    if ( spec == null || spec.getColumns() == null || spec.getColumns().size() == 0)
      return null;
   
    PartitionDef pDef = new PartitionDef(spec);
    for(ColumnSpec colSpec : spec.getColumns())
    {
      ColumnDef cDef = translatePartitionColumn(qDef, iInfo, colSpec);
      pDef.addColumn(cDef);
    }
    return pDef;
  }
View Full Code Here

Examples of org.apache.drill.common.defs.PartitionDef

   * Build a Store operator and validate each field
   */
  @Test
  public void testBuild() {
    String storageEngine = "mock-storage";
    PartitionDef partition = new PartitionDef(PartitionDef.PartitionType.RANGE, null, null);
    JSONOptions target = null;

    Store storeOp = Store.builder()
        .storageEngine(storageEngine)
        .partition(partition)
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.PTFDesc.PartitionDef

    PartitioningSpec partiSpec = wdwSpec.getQueryPartitioningSpec();
    if (partiSpec == null) {
      throw new SemanticException(
          "Invalid use of Windowing: there is no Partitioning associated with Windowing");
    }
    PartitionDef partDef = translate(inpShape, wdwSpec.getQueryPartitionSpec());
    OrderDef ordDef = translate(inpShape, wdwSpec.getQueryOrderSpec(), partDef);

    wdwTFnDef.setPartition(partDef);
    wdwTFnDef.setOrder(ordDef);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.PTFDesc.PartitionDef

    applyConstantPartition(spec);
    if (spec.getPartition() == null) {
      return;
    }
    PartitionDef partDef = translate(def.getRawInputShape(), spec.getPartition());
    OrderDef orderDef = translate(def.getRawInputShape(), spec.getOrder(), partDef);
    def.setPartition(partDef);
    def.setOrder(orderDef);
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.PTFDesc.PartitionDef

      throws SemanticException {
    if (spec == null || spec.getExpressions() == null || spec.getExpressions().size() == 0) {
      return null;
    }

    PartitionDef pDef = new PartitionDef();
    for (PartitionExpression pExpr : spec.getExpressions()) {
      PTFExpressionDef expDef = translate(inpShape, pExpr);
      pDef.addExpression(expDef);
    }
    return pDef;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.plan.PTFDesc.PartitionDef

    dS.initializePTFChain(conf.getFuncDef());
  }

  protected void setupKeysWrapper(ObjectInspector inputOI) throws HiveException
  {
    PartitionDef pDef = conf.getStartOfChain().getPartition();
    ArrayList<PTFExpressionDef> exprs = pDef.getExpressions();
    int numExprs = exprs.size();
    ExprNodeEvaluator[] keyFields = new ExprNodeEvaluator[numExprs];
    ObjectInspector[] keyOIs = new ObjectInspector[numExprs];
    ObjectInspector[] currentKeyOIs = new ObjectInspector[numExprs];
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.