private double getFactor(long currentTime) {
    return nextTimeInCurrentColumn - previousTime == 0
        ? 0.0
        : ((double) (currentTime - previousTime)) / (nextTimeInCurrentColumn - previousTime);
  }
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