Examples of UInt4Vector


Examples of org.apache.drill.exec.vector.UInt4Vector

    defBuilder
        .setMajorType(typeBuilder.build());
        MaterializedField field = MaterializedField.create(defBuilder.build());

    // Create a new value vector for 1024 integers
    UInt4Vector v = new UInt4Vector(field, allocator);
    UInt4Vector.Mutator m = v.getMutator();
    v.allocateNew(1024);

    // Put and set a few values
    m.set(0, 100);
    m.set(1, 101);
    m.set(100, 102);
    m.set(1022, 103);
    m.set(1023, 104);
    assertEquals(100, v.getAccessor().get(0));
    assertEquals(101, v.getAccessor().get(1));
    assertEquals(102, v.getAccessor().get(100));
    assertEquals(103, v.getAccessor().get(1022));
    assertEquals(104, v.getAccessor().get(1023));

    // Ensure unallocated space returns 0
    assertEquals(0, v.getAccessor().get(3));
  }
View Full Code Here

Examples of org.apache.drill.exec.vector.UInt4Vector

        .setMode(DataMode.REQUIRED)
        .setWidth(4);
        MaterializedField field = MaterializedField.create(SchemaPath.getSimplePath(""), typeBuilder.build());

    // Create a new value vector for 1024 integers
    UInt4Vector v = new UInt4Vector(field, allocator);
    UInt4Vector.Mutator m = v.getMutator();
    v.allocateNew(1024);

    // Put and set a few values
    m.setSafe(0, 100);
    m.setSafe(1, 101);
    m.setSafe(100, 102);
    m.setSafe(1022, 103);
    m.setSafe(1023, 104);
    assertEquals(100, v.getAccessor().get(0));
    assertEquals(101, v.getAccessor().get(1));
    assertEquals(102, v.getAccessor().get(100));
    assertEquals(103, v.getAccessor().get(1022));
    assertEquals(104, v.getAccessor().get(1023));

  }
View Full Code Here

Examples of org.apache.drill.exec.vector.UInt4Vector

  public static MajorType TYPE = Types.repeated(MinorType.LIST);

  public RepeatedListVector(MaterializedField field, BufferAllocator allocator){
    this.allocator = allocator;
    this.offsets = new UInt4Vector(null, allocator);
    this.field = field;
  }
View Full Code Here

Examples of org.apache.drill.exec.vector.UInt4Vector

  private int lastSet = -1;

  public RepeatedMapVector(MaterializedField field, BufferAllocator allocator){
    this.field = field;
    this.allocator = allocator;
    this.offsets = new UInt4Vector(null, allocator);

  }
View Full Code Here

Examples of org.apache.drill.exec.vector.UInt4Vector

  private int lastPopulatedValueIndex = -1;

  public RepeatedMapVector(MaterializedField field, BufferAllocator allocator) {
    this.field = field;
    this.allocator = allocator;
    this.offsets = new UInt4Vector(null, allocator);

  }
View Full Code Here

Examples of org.apache.drill.exec.vector.UInt4Vector

  public static MajorType TYPE = Types.repeated(MinorType.LIST);

  public RepeatedListVector(MaterializedField field, BufferAllocator allocator) {
    this.allocator = allocator;
    this.offsets = new UInt4Vector(null, allocator);
    this.field = field;
  }
View Full Code Here

Examples of org.apache.drill.exec.vector.UInt4Vector

  public static MajorType TYPE = Types.repeated(MinorType.LIST);

  public RepeatedListVector(MaterializedField field, BufferAllocator allocator){
    this.allocator = allocator;
    this.offsets = new UInt4Vector(null, allocator);
    this.field = field;
  }
View Full Code Here

Examples of org.apache.drill.exec.vector.UInt4Vector

  private int lastSet = -1;

  public RepeatedMapVector(MaterializedField field, BufferAllocator allocator){
    this.field = field;
    this.allocator = allocator;
    this.offsets = new UInt4Vector(null, allocator);

  }
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.