in java/tsfile/src/main/java/org/apache/tsfile/read/reader/page/PageReader.java [153:210]
public BatchData getAllSatisfiedPageData(boolean ascending) throws IOException {
uncompressDataIfNecessary();
BatchData pageData = BatchDataFactory.createBatchData(dataType, ascending, false);
boolean allSatisfy = recordFilter == null || recordFilter.allSatisfy(this);
while (timeDecoder.hasNext(timeBuffer)) {
long timestamp = timeDecoder.readLong(timeBuffer);
switch (dataType) {
case BOOLEAN:
boolean aBoolean = valueDecoder.readBoolean(valueBuffer);
if (!isDeleted(timestamp)
&& (allSatisfy || recordFilter.satisfyBoolean(timestamp, aBoolean))) {
pageData.putBoolean(timestamp, aBoolean);
}
break;
case INT32:
case DATE:
int anInt = valueDecoder.readInt(valueBuffer);
if (!isDeleted(timestamp)
&& (allSatisfy || recordFilter.satisfyInteger(timestamp, anInt))) {
pageData.putInt(timestamp, anInt);
}
break;
case INT64:
case TIMESTAMP:
long aLong = valueDecoder.readLong(valueBuffer);
if (!isDeleted(timestamp) && (allSatisfy || recordFilter.satisfyLong(timestamp, aLong))) {
pageData.putLong(timestamp, aLong);
}
break;
case FLOAT:
float aFloat = valueDecoder.readFloat(valueBuffer);
if (!isDeleted(timestamp)
&& (allSatisfy || recordFilter.satisfyFloat(timestamp, aFloat))) {
pageData.putFloat(timestamp, aFloat);
}
break;
case DOUBLE:
double aDouble = valueDecoder.readDouble(valueBuffer);
if (!isDeleted(timestamp)
&& (allSatisfy || recordFilter.satisfyDouble(timestamp, aDouble))) {
pageData.putDouble(timestamp, aDouble);
}
break;
case TEXT:
case BLOB:
case STRING:
Binary aBinary = valueDecoder.readBinary(valueBuffer);
if (!isDeleted(timestamp)
&& (allSatisfy || recordFilter.satisfyBinary(timestamp, aBinary))) {
pageData.putBinary(timestamp, aBinary);
}
break;
default:
throw new UnSupportedDataTypeException(String.valueOf(dataType));
}
}
return pageData.flip();
}