Java Code Examples for org.apache.arrow.vector.complex.StructVector#getChildrenFromFields()

The following examples show how to use org.apache.arrow.vector.complex.StructVector#getChildrenFromFields() . 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: ArrowStructColumn.java    From yosegi with Apache License 2.0 5 votes vote down vote up
/**
 * Initialize by setting column name and Arrow vector.
 */
public ArrowStructColumn( final String columnName , final StructVector vector ) {
  this.columnName = columnName;

  List<FieldVector> vectorList = vector.getChildrenFromFields();
  spread = new Spread();
  for ( FieldVector v : vectorList ) {
    spread.addColumn( ArrowColumnFactory.convert( v.getField().getName() , v ) );
  }
  spread.setRowCount( vector.getValueCount() );
}
 
Example 2
Source File: ArrowStructColumn.java    From multiple-dimension-spread with Apache License 2.0 5 votes vote down vote up
public ArrowStructColumn( final String columnName , final StructVector vector ){
  this.columnName = columnName;

  List<FieldVector> vectorList = vector.getChildrenFromFields();
  spread = new Spread();
  for( FieldVector v : vectorList ){
    spread.addColumn( ArrowColumnFactory.convert( v.getField().getName() , v ) );
  }
  spread.setRowCount( vector.getValueCount() );
}