public ITimeIndex getTimeIndex() {
    switch (this) {
      case V012_FILE_TIME_INDEX:
        throw new IllegalStateException("V012_FILE_TIME_INDEX should never appear");
      case PLAIN_DEVICE_TIME_INDEX:
        return new PlainDeviceTimeIndex();
      case FILE_TIME_INDEX:
        return new FileTimeIndex();
      case ARRAY_DEVICE_TIME_INDEX:
      default:
        return new ArrayDeviceTimeIndex();
    }
  }
array device to time index (large memory foot print)
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/TimeIndexLevel.java