public static Block fromFieldBlocks ( int positionCount , Optional < boolean [ ] > rowIsNull , Block [ ] fieldBlocks ) { int [ ] fieldBlockOffsets = new int [ positionCount + 1 ] ; for ( int position = 0 ; position < positionCount ; position ++ ) { fieldBlockOffsets [ position + 1 ] = fieldBlockOffsets [ position ] + ( rowIsNull . isPresent ( ) && rowIsNull . get ( ) [ position ] ? 0 : 1 ) ; } validateConstructorArguments ( 0 , positionCount , rowIsNull . orElse ( null ) , fieldBlockOffsets , fieldBlocks ) ; return new RowBlock ( 0 , positionCount , rowIsNull . orElse ( null ) , fieldBlockOffsets , fieldBlocks ) ; }
Create a row block directly from columnar nulls and field blocks .