Skip to content

Conversation

@zerolbsony
Copy link
Contributor

Only delete data, but don't delete tsfile when performing a drop column statement on the table model or a drop tag statement on the tree model.

img_v3_02t4_59f67abd-d137-4944-b9fc-8538c51051cg
img_v3_02t4_247f5e80-716b-4991-9a83-eb4229ad688g

@zerolbsony zerolbsony force-pushed the improve_optimize_delete_tsfile branch from b6ef768 to 8b91c88 Compare December 22, 2025 01:28
# Conflicts:
#	iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/DeletionPredicate.java
# Conflicts:
#	iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java
… statistics in current chunk metadata so that resolve "Statistics classes mismatched: class org.apache.tsfile.file.metadata.statistics.BinaryStatistics vs. class org.apache.tsfile.file.metadata.statistics.IntegerStatistics" exception.
Comment on lines +452 to +462
if (chunkMetadata.getDataType() == TSDataType.BOOLEAN) {
binaryValues[2] = new Binary(Boolean.FALSE.toString(), StandardCharsets.UTF_8);
binaryValues[3] = new Binary(Boolean.TRUE.toString(), StandardCharsets.UTF_8);
} else {
binaryValues[2] =
new Binary(
chunkMetadata.getStatistics().getMinValue().toString(), StandardCharsets.UTF_8);
binaryValues[3] =
new Binary(
chunkMetadata.getStatistics().getMaxValue().toString(), StandardCharsets.UTF_8);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to process DATE especially?

Comment on lines +495 to +499
Arrays.asList(TSDataType.TEXT, TSDataType.BLOB)
.contains(chunkMetadata.getDataType())
? ""
: chunkMetadata.getStatistics().getMinValue().toString(),
StandardCharsets.UTF_8);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you checking the data type of the chunk metadata again, now that it is in the switch clause?

Comment on lines +519 to +520
binaryValues[0] = new Binary("", StandardCharsets.UTF_8);
binaryValues[1] = new Binary("", StandardCharsets.UTF_8);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May creaete a constant as a placeholder for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants