private Column doWithAllNulls(
      long startRowIndex, int size, Column timeColumn, Column valueColumn) {
    // previous value is null or next value is null, we just return NULL_VALUE_BLOCK
    if (previousIsNull || nextRowIndex < startRowIndex) {
      return new RunLengthEncodedColumn(createNullValueColumn(), size);
    } else {
      prepareForNextValueInCurrentColumn(startRowIndex + size - 1, size, timeColumn, valueColumn);
      double[] factors = new double[size];
      boolean[] valueIsNull = new boolean[size];
      boolean hasNull = false;
      for (int i = 0; i < size; i++) {
        if (timeColumn.isNull(i)) {
          valueIsNull[i] = true;
          hasNull = true;
        } else {
          factors[i] = getFactor(timeColumn.getLong(i));
        }
      }
      return createFilledValueColumn(
          factors, hasNull ? Optional.empty() : Optional.of(valueIsNull));
    }
  }
The result of Linear Fill functions at timestamp "T" is calculated by performing a linear fitting
method on two time series values, one is at the closest timestamp before T, and the other is at
the closest timestamp after T. Linear Fill function calculation only supports numeric types
including long, int, double and float.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/fill/linear/LinearFill.java