in tsfile-viewer-core/src/main/java/org/apache/iotdb/tool/core/service/TsFileAnalyserV13.java [294:323]
private void setChunkStatistics(
Statistics<? extends Serializable> chunkStatistics,
long currentTime,
TsPrimitiveType value,
TSDataType dataType)
throws IOException {
switch (dataType) {
case INT32:
chunkStatistics.update(currentTime, value.getInt());
break;
case INT64:
chunkStatistics.update(currentTime, value.getLong());
break;
case FLOAT:
chunkStatistics.update(currentTime, value.getFloat());
break;
case DOUBLE:
chunkStatistics.update(currentTime, value.getDouble());
break;
case BOOLEAN:
chunkStatistics.update(currentTime, value.getBoolean());
break;
case TEXT:
chunkStatistics.update(currentTime, value.getBinary());
break;
default:
logger.error("Unexpected type:{}", dataType);
throw new IOException("Unexpected type " + dataType);
}
}