Java Code Examples for org.apache.arrow.vector.FieldVector#getFieldBuffers()

The following examples show how to use org.apache.arrow.vector.FieldVector#getFieldBuffers() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseSingleAccumulatorNoSpill.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public static void setNullAndValue(FieldVector vector, long value){
  List<ArrowBuf> buffers = vector.getFieldBuffers();
  ArrowBuf bits = buffers.get(0);
  writeWordwise(bits.memoryAddress(), bits.capacity(), OFF);
  ArrowBuf values = buffers.get(1);
  writeWordwise(values.memoryAddress(), values.capacity(), value);
}
 
Example 2
Source File: BaseSingleAccumulatorNoSpill.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public static void setNullAndValue(FieldVector vector, int value){
  List<ArrowBuf> buffers = vector.getFieldBuffers();
  ArrowBuf bits = buffers.get(0);
  writeWordwise(bits.memoryAddress(), bits.capacity(), OFF);
  ArrowBuf values = buffers.get(1);
  fillInts(values.memoryAddress(), values.capacity(), value);
}
 
Example 3
Source File: BaseSingleAccumulatorNoSpill.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public static void setNullAndZero(FieldVector vector){
  List<ArrowBuf> buffers = vector.getFieldBuffers();
  ArrowBuf bits = buffers.get(0);
  writeWordwise(bits.memoryAddress(), bits.capacity(), OFF);
  ArrowBuf values = buffers.get(1);
  writeWordwise(values.memoryAddress(), values.capacity(), OFF);
}
 
Example 4
Source File: BaseSingleAccumulatorNoSpill.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public static void setNotNullAndZero(FieldVector vector){
  List<ArrowBuf> buffers = vector.getFieldBuffers();
  ArrowBuf bits = buffers.get(0);
  writeWordwise(bits.memoryAddress(), bits.capacity(), ON);
  ArrowBuf values = buffers.get(1);
  writeWordwise(values.memoryAddress(), values.capacity(), OFF);
}
 
Example 5
Source File: BaseSingleAccumulatorNoSpill.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public static void setNullAndValue(FieldVector vector, BigDecimal value){
  List<ArrowBuf> buffers = vector.getFieldBuffers();
  ArrowBuf bits = buffers.get(0);
  writeWordwise(bits.memoryAddress(), bits.capacity(), OFF);
  ArrowBuf values = buffers.get(1);
  writeWordwise(values, values.capacity(), value);
}
 
Example 6
Source File: BaseSingleAccumulator.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public static void setNullAndValue(FieldVector vector, long value){
  List<ArrowBuf> buffers = vector.getFieldBuffers();
  ArrowBuf bits = buffers.get(0);
  writeWordwise(bits.memoryAddress(), bits.capacity(), OFF);
  ArrowBuf values = buffers.get(1);
  writeWordwise(values.memoryAddress(), values.capacity(), value);
}
 
Example 7
Source File: BaseSingleAccumulator.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public static void setNullAndValue(FieldVector vector, int value){
  List<ArrowBuf> buffers = vector.getFieldBuffers();
  ArrowBuf bits = buffers.get(0);
  writeWordwise(bits.memoryAddress(), bits.capacity(), OFF);
  ArrowBuf values = buffers.get(1);
  fillInts(values.memoryAddress(), values.capacity(), value);
}
 
Example 8
Source File: BaseSingleAccumulator.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public static void setNullAndZero(FieldVector vector){
  List<ArrowBuf> buffers = vector.getFieldBuffers();
  ArrowBuf bits = buffers.get(0);
  writeWordwise(bits.memoryAddress(), bits.capacity(), OFF);
  ArrowBuf values = buffers.get(1);
  writeWordwise(values.memoryAddress(), values.capacity(), OFF);
}
 
Example 9
Source File: BaseSingleAccumulator.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public static void setNotNullAndZero(FieldVector vector){
  List<ArrowBuf> buffers = vector.getFieldBuffers();
  ArrowBuf bits = buffers.get(0);
  writeWordwise(bits.memoryAddress(), bits.capacity(), ON);
  ArrowBuf values = buffers.get(1);
  writeWordwise(values.memoryAddress(), values.capacity(), OFF);
}
 
Example 10
Source File: BaseSingleAccumulator.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public static void setNullAndValue(FieldVector vector, BigDecimal value){
  List<ArrowBuf> buffers = vector.getFieldBuffers();
  ArrowBuf bits = buffers.get(0);
  writeWordwise(bits.memoryAddress(), bits.capacity(), OFF);
  ArrowBuf values = buffers.get(1);
  writeWordwise(values, values.capacity(), value);
}
 
Example 11
Source File: Unpivots.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public static int fillAddresses(long[] addresses, int offset, FieldVector vector){
  for(ArrowBuf ab : vector.getFieldBuffers()){
    addresses[offset] = ab.memoryAddress();
    offset++;
  }
  return offset;
}