Class BinaryArrayWriter

    • Constructor Detail

      • BinaryArrayWriter

        public BinaryArrayWriter​(BinaryArrayData array,
                                 int numElements,
                                 int elementSize)
    • Method Detail

      • reset

        public void reset()
        First, reset.
      • setNullBit

        public void setNullBit​(int ordinal)
      • setNullBoolean

        public void setNullBoolean​(int ordinal)
      • setNullByte

        public void setNullByte​(int ordinal)
      • setNullShort

        public void setNullShort​(int ordinal)
      • setNullInt

        public void setNullInt​(int ordinal)
      • setNullLong

        public void setNullLong​(int ordinal)
      • setNullFloat

        public void setNullFloat​(int ordinal)
      • setNullDouble

        public void setNullDouble​(int ordinal)
      • setNullAt

        public void setNullAt​(int ordinal)
        Description copied from interface: BinaryWriter
        Set null to this field.
      • getFieldOffset

        public int getFieldOffset​(int pos)
        Get field offset.
      • setOffsetAndSize

        public void setOffsetAndSize​(int pos,
                                     int offset,
                                     long size)
        Set offset and size to fix len part.
      • writeBoolean

        public void writeBoolean​(int pos,
                                 boolean value)
      • writeByte

        public void writeByte​(int pos,
                              byte value)
      • writeShort

        public void writeShort​(int pos,
                               short value)
      • writeInt

        public void writeInt​(int pos,
                             int value)
      • writeLong

        public void writeLong​(int pos,
                              long value)
      • writeFloat

        public void writeFloat​(int pos,
                               float value)
      • writeDouble

        public void writeDouble​(int pos,
                                double value)
      • afterGrow

        public void afterGrow()
        After grow, need point to new memory.
      • complete

        public void complete()
        Finally, complete write to set real size to row.
      • getNumElements

        public int getNumElements()
      • createNullSetter

        public static BinaryArrayWriter.NullSetter createNullSetter​(LogicalType elementType)
        Creates an for accessor setting the elements of an array writer to null during runtime.
        Parameters:
        elementType - the element type of the array
      • writeBinary

        public void writeBinary​(int pos,
                                byte[] bytes)
        Specified by:
        writeBinary in interface BinaryWriter
      • zeroOutPaddingBytes

        protected void zeroOutPaddingBytes​(int numBytes)
      • ensureCapacity

        protected void ensureCapacity​(int neededSize)
      • roundNumberOfBytesToNearestWord

        protected static int roundNumberOfBytesToNearestWord​(int numBytes)