public void updateLastCacheIfExists(
      final String database,
      final IDeviceID deviceID,
      final String[] measurements,
      final @Nonnull TimeValuePair[] timeValuePairs,
      final boolean isAligned,
      final IMeasurementSchema[] measurementSchemas) {
    tableDeviceSchemaCache.updateLastCache(
        database, deviceID, measurements, timeValuePairs, isAligned, measurementSchemas, false);
  }
Update the {@link TableDeviceLastCache} in writing for tree model. If a measurement is with all
{@code null}s or is an id/attribute column, its {@link TimeValuePair[]} shall be {@code null}.
For correctness, this will put the {@link TableDeviceCacheEntry} lazily and only update the
existing {@link TableDeviceLastCache}s of measurements.

@param database the device's database, WITH "root"
@param deviceID {@link IDeviceID}
@param measurements the fetched measurements
@param timeValuePairs the {@link TimeValuePair}s with indexes corresponding to the measurements
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/cache/TreeDeviceSchemaCacheManager.java