Class AlignedTVList

    • Method Detail

      • newAlignedList

        public static AlignedTVList newAlignedList​(java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypes)
      • putAlignedValue

        public void putAlignedValue​(long timestamp,
                                    java.lang.Object[] value,
                                    int[] columnIndexArray)
        Overrides:
        putAlignedValue in class TVList
      • getAlignedValue

        public java.lang.Object getAlignedValue​(int index)
        Overrides:
        getAlignedValue in class TVList
      • getTimeValuePair

        protected org.apache.iotdb.tsfile.read.TimeValuePair getTimeValuePair​(int index,
                                                                              long time,
                                                                              java.lang.Integer floatPrecision,
                                                                              org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding)
        Specified by:
        getTimeValuePair in class TVList
      • getTvListByColumnIndex

        public TVList getTvListByColumnIndex​(java.util.List<java.lang.Integer> columnIndex,
                                             java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> dataTypeList)
        Overrides:
        getTvListByColumnIndex in class TVList
      • extendColumn

        public void extendColumn​(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType)
      • getIntByValueIndex

        public int getIntByValueIndex​(int rowIndex,
                                      int columnIndex)
        Get the int value at the given position in AlignedTvList.
        Parameters:
        rowIndex - value index inside this column
        columnIndex - index of the column
        Returns:
        the value at this position in VectorTvList
      • getLongByValueIndex

        public long getLongByValueIndex​(int rowIndex,
                                        int columnIndex)
        Get the long value at the given position in VectorTvList.
        Parameters:
        rowIndex - value index inside this column
        columnIndex - index of the column
        Returns:
        the value at this position in VectorTvList
      • getFloatByValueIndex

        public float getFloatByValueIndex​(int rowIndex,
                                          int columnIndex)
        Get the float value at the given position in VectorTvList.
        Parameters:
        rowIndex - value index inside this column
        columnIndex - index of the column
        Returns:
        the value at this position in VectorTvList
      • getDoubleByValueIndex

        public double getDoubleByValueIndex​(int rowIndex,
                                            int columnIndex)
        Get the double value at the given position in VectorTvList.
        Parameters:
        rowIndex - value index inside this column
        columnIndex - index of the column
        Returns:
        the value at this position in VectorTvList
      • getBinaryByValueIndex

        public org.apache.iotdb.tsfile.utils.Binary getBinaryByValueIndex​(int rowIndex,
                                                                          int columnIndex)
        Get the Binary value at the given position in VectorTvList.
        Parameters:
        rowIndex - value index inside this column
        columnIndex - index of the column
        Returns:
        the value at this position in VectorTvList
      • getBooleanByValueIndex

        public boolean getBooleanByValueIndex​(int rowIndex,
                                              int columnIndex)
        Get the boolean value at the given position in VectorTvList.
        Parameters:
        rowIndex - value index inside this column
        columnIndex - index of the column
        Returns:
        the value at this position in VectorTvList
      • isNullValue

        public boolean isNullValue​(int rowIndex,
                                   int columnIndex)
        Get whether value is null at the given position in AlignedTvList.
        Parameters:
        rowIndex - value index inside this column
        columnIndex - index of the column
        Returns:
        boolean
      • getValues

        public java.util.List<java.util.List<java.lang.Object>> getValues()
      • getTsDataTypes

        public java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSDataType> getTsDataTypes()
      • delete

        public int delete​(long lowerBound,
                          long upperBound)
        Overrides:
        delete in class TVList
      • delete

        public org.apache.iotdb.tsfile.utils.Pair<java.lang.Integer,​java.lang.Boolean> delete​(long lowerBound,
                                                                                                    long upperBound,
                                                                                                    int columnIndex)
        Delete points in a specific column.
        Parameters:
        lowerBound - deletion lower bound
        upperBound - deletion upper bound
        columnIndex - column index to be deleted
        Returns:
        Delete info pair. Left: deletedNumber int; right: ifDeleteColumn boolean
      • deleteColumn

        public void deleteColumn​(int columnIndex)
      • sort

        public void sort()
        Specified by:
        sort in class TVList
      • setFromSorted

        protected void setFromSorted​(int src,
                                     int dest)
        Specified by:
        setFromSorted in class TVList
      • set

        protected void set​(int src,
                           int dest)
        Specified by:
        set in class TVList
      • setToSorted

        protected void setToSorted​(int src,
                                   int dest)
        Specified by:
        setToSorted in class TVList
      • reverseRange

        protected void reverseRange​(int lo,
                                    int hi)
        Specified by:
        reverseRange in class TVList
      • expandValues

        protected void expandValues()
        Specified by:
        expandValues in class TVList
      • saveAsPivot

        protected void saveAsPivot​(int pos)
        Specified by:
        saveAsPivot in class TVList
      • getValueIndex

        public int getValueIndex​(int index)
        Get the row index value in index column
        Overrides:
        getValueIndex in class TVList
        Parameters:
        index - row index
      • getValidRowIndexForTimeDuplicatedRows

        public int getValidRowIndexForTimeDuplicatedRows​(java.util.List<java.lang.Integer> timeDuplicatedOriginRowIndexList,
                                                         int columnIndex)
        Get the valid original row index in a column by a given time duplicated original row index list.
        Parameters:
        timeDuplicatedOriginRowIndexList - The row index list that the time of all indexes are same.
        columnIndex - The index of a given column.
        Returns:
        The original row index of the latest non-null value, or the first row index if all values in given columns are null.
      • setPivotTo

        protected void setPivotTo​(int pos)
        Specified by:
        setPivotTo in class TVList
      • getTimeValuePair

        public org.apache.iotdb.tsfile.read.TimeValuePair getTimeValuePair​(int index)
        Description copied from class: TVList
        for log
        Specified by:
        getTimeValuePair in class TVList
      • getTimeValuePair

        protected org.apache.iotdb.tsfile.read.TimeValuePair getTimeValuePair​(int index,
                                                                              long time,
                                                                              java.lang.Integer floatPrecision,
                                                                              java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodingList)
      • putAlignedValues

        public void putAlignedValues​(long[] time,
                                     java.lang.Object[] value,
                                     org.apache.iotdb.tsfile.utils.BitMap[] bitMaps,
                                     int[] columnIndexArray,
                                     int start,
                                     int end)
        Overrides:
        putAlignedValues in class TVList
      • getDataType

        public org.apache.iotdb.tsfile.file.metadata.enums.TSDataType getDataType()
        Specified by:
        getDataType in class TVList
      • alignedTvListArrayMemCost

        public static long alignedTvListArrayMemCost​(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType[] types)
        Get the single alignedTVList array mem cost by give types.
        Parameters:
        types - the types in the vector
        Returns:
        AlignedTvListArrayMemSize
      • clear

        public void clear()
        Overrides:
        clear in class TVList
      • buildTsBlock

        public org.apache.iotdb.tsfile.read.common.block.TsBlock buildTsBlock​(int floatPrecision,
                                                                              java.util.List<org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding> encodingList,
                                                                              java.util.List<java.util.List<org.apache.iotdb.tsfile.read.common.TimeRange>> deletionList)
        Build TsBlock by column.
      • writeValidValuesIntoTsBlock

        protected void writeValidValuesIntoTsBlock​(org.apache.iotdb.tsfile.read.common.block.TsBlockBuilder builder,
                                                   int floatPrecision,
                                                   org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding,
                                                   java.util.List<org.apache.iotdb.tsfile.read.common.TimeRange> deletionList)
        Specified by:
        writeValidValuesIntoTsBlock in class TVList
      • serializedSize

        public int serializedSize()
        Description copied from interface: SerializedSize
        Calculate size after serialization.
        Returns:
        bytes number
      • serializeToWAL

        public void serializeToWAL​(IWALByteBufferView buffer)
        Description copied from interface: WALEntryValue
        Serialize using IWALByteBufferView, which encapsulates some actions to deal with BufferOverflowException occurs in ByteBuffer.
      • deserialize

        public static AlignedTVList deserialize​(java.io.DataInputStream stream)
                                         throws java.io.IOException
        Throws:
        java.io.IOException