Examples of SelectionVector4


Examples of org.apache.drill.exec.record.selection.SelectionVector4

  public void build(FragmentContext context) throws SchemaChangeException{
    container.clear();
    if(batches.keySet().size() > 1) throw new SchemaChangeException("Sort currently only supports a single schema.");
    if(batches.size() > Character.MAX_VALUE) throw new SchemaChangeException("Sort cannot work on more than %d batches at a time.", (int) Character.MAX_VALUE);
    sv4 = new SelectionVector4(svAllocator.getAllocation(), recordCount, Character.MAX_VALUE);
    BatchSchema schema = batches.keySet().iterator().next();
    List<RecordBatchData> data = batches.get(schema);
   
    // now we're going to generate the sv4 pointers
    switch(schema.getSelectionVectorMode()){
View Full Code Here

Examples of org.apache.drill.exec.record.selection.SelectionVector4

  }

  public void build() throws SchemaChangeException {
    container.clear();
    if (queuedRightBatches.size() > Character.MAX_VALUE) throw new SchemaChangeException("Join cannot work on more than %d batches at a time.", (int) Character.MAX_VALUE);
    status.sv4 = new SelectionVector4(svAllocator.getAllocation(), recordCount, Character.MAX_VALUE);
    BatchSchema schema = queuedRightBatches.keySet().iterator().next();
    List<RecordBatchData> data = queuedRightBatches.get(schema);

    // now we're going to generate the sv4 pointers
    switch(schema.getSelectionVectorMode()){
View Full Code Here

Examples of org.apache.drill.exec.record.selection.SelectionVector4

  }

  public void build() throws SchemaChangeException {
    container.clear();
    if (queuedRightBatches.size() > Character.MAX_VALUE) throw new SchemaChangeException("Join cannot work on more than %d batches at a time.", (int) Character.MAX_VALUE);
    status.sv4 = new SelectionVector4(svAllocator.getAllocation(), recordCount, Character.MAX_VALUE);
    BatchSchema schema = queuedRightBatches.keySet().iterator().next();
    List<RecordBatchData> data = queuedRightBatches.get(schema);

    // now we're going to generate the sv4 pointers
    switch(schema.getSelectionVectorMode()){
View Full Code Here

Examples of org.apache.drill.exec.record.selection.SelectionVector4

    this.allocators = allocators;
    this.size = batchGroups.size();

    BufferAllocator.PreAllocator preAlloc = allocator.getNewPreAllocator();
    preAlloc.preAllocate(4 * size);
    vector4 = new SelectionVector4(preAlloc.getAllocation(), size, Character.MAX_VALUE);
    doSetup(context, hyperBatch, outgoing);

    queueSize = 0;
    for (int i = 0; i < size; i++) {
      vector4.set(i, i * 2, batchGroups.get(i).getNextIndex());
View Full Code Here

Examples of org.apache.drill.exec.record.selection.SelectionVector4

        throw new UnsupportedOperationException("Missing batch");
      }
    }
    BufferAllocator.PreAllocator preAlloc = allocator.getNewPreAllocator();
    preAlloc.preAllocate(4 * this.vector4.getTotalCount());
    aux = new SelectionVector4(preAlloc.getAllocation(), this.vector4.getTotalCount(), Character.MAX_VALUE);
  }
View Full Code Here

Examples of org.apache.drill.exec.record.selection.SelectionVector4

        if (outIndex < vector4.getTotalCount()) newRunStarts.add(outIndex);
      }
      if (outIndex < vector4.getTotalCount()) {
        copyRun(outIndex, vector4.getTotalCount());
      }
      SelectionVector4 tmp = aux.createNewWrapperCurrent();
      aux.clear();
      aux = this.vector4.createNewWrapperCurrent();
      vector4.clear();
      this.vector4 = tmp.createNewWrapperCurrent();
      tmp.clear();
      runStarts = newRunStarts;
    }
    aux.clear();
  }
View Full Code Here

Examples of org.apache.drill.exec.record.selection.SelectionVector4

  }

  private void constructSV4() throws SchemaChangeException {
    BufferAllocator.PreAllocator preAlloc = oContext.getAllocator().getNewPreAllocator();
    preAlloc.preAllocate(4 * TARGET_RECORD_COUNT);
    sv4 = new SelectionVector4(preAlloc.getAllocation(), TARGET_RECORD_COUNT, TARGET_RECORD_COUNT);
  }
View Full Code Here

Examples of org.apache.drill.exec.record.selection.SelectionVector4

    if(batches.keySet().size() > 1) throw new SchemaChangeException("Sort currently only supports a single schema.");
    if(batches.size() > Character.MAX_VALUE) throw new SchemaChangeException("Sort cannot work on more than %d batches at a time.", (int) Character.MAX_VALUE);
    if(batches.keys().size() < 1){
      assert false : "Invalid to have an empty set of batches with no schemas.";
    }
    sv4 = new SelectionVector4(svAllocator.getAllocation(), recordCount, Character.MAX_VALUE);
    BatchSchema schema = batches.keySet().iterator().next();
    List<RecordBatchData> data = batches.get(schema);

    // now we're going to generate the sv4 pointers
    switch(schema.getSelectionVectorMode()){
View Full Code Here

Examples of org.apache.drill.exec.record.selection.SelectionVector4

    this.size = batchGroups.size();
    this.hyperBatch = hyperBatch;

    BufferAllocator.PreAllocator preAlloc = allocator.getNewPreAllocator();
    preAlloc.preAllocate(4 * size);
    vector4 = new SelectionVector4(preAlloc.getAllocation(), size, Character.MAX_VALUE);
    doSetup(context, hyperBatch, null);

    for (int i = 0; i < size; i++, queueSize++) {
      vector4.set(i, i * 2, batchGroups.get(i).getNextIndex());
      siftUp();
View Full Code Here

Examples of org.apache.drill.exec.record.selection.SelectionVector4

    builder.build(context, sortedSamples);

    // Sort the records according the orderings given in the configuration

    Sorter sorter = SortBatch.createNewSorter(context, popConfig.getOrderings(), sortedSamples);
    SelectionVector4 sv4 = builder.getSv4();
    sorter.setup(context, sv4, sortedSamples);
    sorter.sort(sv4, sortedSamples);

    // Project every Nth record to a new vector container, where N = recordsSampled/(samplingFactor * partitions).
    // Uses the
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.