Package org.apache.drill.exec.vector.complex.writer

Examples of org.apache.drill.exec.vector.complex.writer.FieldWriter


  public void checkValueCapacity(){
    inform(container.getValueCapacity() > idx());
  }

  public MapWriter map(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      int vectorCount = container.size();
      MapVector vector = container.addOrGet(name, MapVector.TYPE, MapVector.class);
      writer = new SingleMapWriter(vector, this);
      if(vectorCount != container.size()) writer.allocate();
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here


   
  }
 
 
  public ListWriter list(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      writer = new SingleListWriter(name, container, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

  }
 
 
  private static final MajorType TINYINT_TYPE = Types.optional(MinorType.TINYINT);
  public TinyIntWriter tinyInt(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableTinyIntVector vector = container.addOrGet(name, TINYINT_TYPE, NullableTinyIntVector.class);
      vector.allocateNewSafe();
      writer = new NullableTinyIntWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType UINT1_TYPE = Types.optional(MinorType.UINT1);
  public UInt1Writer uInt1(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableUInt1Vector vector = container.addOrGet(name, UINT1_TYPE, NullableUInt1Vector.class);
      vector.allocateNewSafe();
      writer = new NullableUInt1WriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType UINT2_TYPE = Types.optional(MinorType.UINT2);
  public UInt2Writer uInt2(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableUInt2Vector vector = container.addOrGet(name, UINT2_TYPE, NullableUInt2Vector.class);
      vector.allocateNewSafe();
      writer = new NullableUInt2WriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType SMALLINT_TYPE = Types.optional(MinorType.SMALLINT);
  public SmallIntWriter smallInt(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableSmallIntVector vector = container.addOrGet(name, SMALLINT_TYPE, NullableSmallIntVector.class);
      vector.allocateNewSafe();
      writer = new NullableSmallIntWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType INT_TYPE = Types.optional(MinorType.INT);
  public IntWriter integer(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableIntVector vector = container.addOrGet(name, INT_TYPE, NullableIntVector.class);
      vector.allocateNewSafe();
      writer = new NullableIntWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType UINT4_TYPE = Types.optional(MinorType.UINT4);
  public UInt4Writer uInt4(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableUInt4Vector vector = container.addOrGet(name, UINT4_TYPE, NullableUInt4Vector.class);
      vector.allocateNewSafe();
      writer = new NullableUInt4WriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType FLOAT4_TYPE = Types.optional(MinorType.FLOAT4);
  public Float4Writer float4(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableFloat4Vector vector = container.addOrGet(name, FLOAT4_TYPE, NullableFloat4Vector.class);
      vector.allocateNewSafe();
      writer = new NullableFloat4WriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType TIME_TYPE = Types.optional(MinorType.TIME);
  public TimeWriter time(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableTimeVector vector = container.addOrGet(name, TIME_TYPE, NullableTimeVector.class);
      vector.allocateNewSafe();
      writer = new NullableTimeWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

TOP

Related Classes of org.apache.drill.exec.vector.complex.writer.FieldWriter

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.