public int getValidRowIndexForTimeDuplicatedRows(
      List<Integer> timeDuplicatedOriginRowIndexList, int columnIndex) {
    int validRowIndex = timeDuplicatedOriginRowIndexList.get(0);
    for (int originRowIndex : timeDuplicatedOriginRowIndexList) {
      if (!isNullValue(originRowIndex, columnIndex)) {
        validRowIndex = originRowIndex;
      }
    }
    return validRowIndex;
  }
Get the valid original row index in a column by a given time duplicated original row index
list.

@param timeDuplicatedOriginRowIndexList The row index list that the time of all indexes are
    same.
@param columnIndex The index of a given column.
@return The original row index of the latest non-null value, or the first row index if all
    values in given columns are null.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/AlignedTVList.java