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

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


 
 
 
  private static final MajorType INTERVAL_TYPE = Types.optional(MinorType.INTERVAL);
  public IntervalWriter interval(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableIntervalVector vector = container.addOrGet(name, INTERVAL_TYPE, NullableIntervalVector.class);
      vector.allocateNewSafe();
      writer = new NullableIntervalWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here


 
 
 
  private static final MajorType DECIMAL28DENSE_TYPE = Types.optional(MinorType.DECIMAL28DENSE);
  public Decimal28DenseWriter decimal28Dense(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableDecimal28DenseVector vector = container.addOrGet(name, DECIMAL28DENSE_TYPE, NullableDecimal28DenseVector.class);
      vector.allocateNewSafe();
      writer = new NullableDecimal28DenseWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType DECIMAL38DENSE_TYPE = Types.optional(MinorType.DECIMAL38DENSE);
  public Decimal38DenseWriter decimal38Dense(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableDecimal38DenseVector vector = container.addOrGet(name, DECIMAL38DENSE_TYPE, NullableDecimal38DenseVector.class);
      vector.allocateNewSafe();
      writer = new NullableDecimal38DenseWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType DECIMAL38SPARSE_TYPE = Types.optional(MinorType.DECIMAL38SPARSE);
  public Decimal38SparseWriter decimal38Sparse(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableDecimal38SparseVector vector = container.addOrGet(name, DECIMAL38SPARSE_TYPE, NullableDecimal38SparseVector.class);
      vector.allocateNewSafe();
      writer = new NullableDecimal38SparseWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType DECIMAL28SPARSE_TYPE = Types.optional(MinorType.DECIMAL28SPARSE);
  public Decimal28SparseWriter decimal28Sparse(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableDecimal28SparseVector vector = container.addOrGet(name, DECIMAL28SPARSE_TYPE, NullableDecimal28SparseVector.class);
      vector.allocateNewSafe();
      writer = new NullableDecimal28SparseWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType VARBINARY_TYPE = Types.optional(MinorType.VARBINARY);
  public VarBinaryWriter varBinary(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableVarBinaryVector vector = container.addOrGet(name, VARBINARY_TYPE, NullableVarBinaryVector.class);
      vector.allocateNewSafe();
      writer = new NullableVarBinaryWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType VARCHAR_TYPE = Types.optional(MinorType.VARCHAR);
  public VarCharWriter varChar(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableVarCharVector vector = container.addOrGet(name, VARCHAR_TYPE, NullableVarCharVector.class);
      vector.allocateNewSafe();
      writer = new NullableVarCharWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType VAR16CHAR_TYPE = Types.optional(MinorType.VAR16CHAR);
  public Var16CharWriter var16Char(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableVar16CharVector vector = container.addOrGet(name, VAR16CHAR_TYPE, NullableVar16CharVector.class);
      vector.allocateNewSafe();
      writer = new NullableVar16CharWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

 
 
 
  private static final MajorType BIT_TYPE = Types.optional(MinorType.BIT);
  public BitWriter bit(String name){
    FieldWriter writer = fields.get(name);
    if(writer == null){
      NullableBitVector vector = container.addOrGet(name, BIT_TYPE, NullableBitVector.class);
      vector.allocateNewSafe();
      writer = new NullableBitWriterImpl(vector, this);
      writer.setPosition(idx());
      fields.put(name, writer);
    }
    return writer;
  }
View Full Code Here

  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(currentChildIndex);
      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.