-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Only delete data, but don't delete tsfile when performing a drop column statement on the table model #16936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jt2594838
merged 27 commits into
apache:master
from
zerolbsony:improve_optimize_delete_tsfile
Jan 12, 2026
Merged
Only delete data, but don't delete tsfile when performing a drop column statement on the table model #16936
jt2594838
merged 27 commits into
apache:master
from
zerolbsony:improve_optimize_delete_tsfile
Jan 12, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…can't rename file successfully.
…mn statement on the table model or a drop tag statement on the tree model.
…ement on table model.
b6ef768 to
8b91c88
Compare
jt2594838
reviewed
Dec 25, 2025
integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDeletionIT.java
Outdated
Show resolved
Hide resolved
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java
Outdated
Show resolved
Hide resolved
# Conflicts: # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/modification/DeletionPredicate.java
…ot NOP when delete table data by tag.
# Conflicts: # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java
jt2594838
approved these changes
Jan 6, 2026
… 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.
jt2594838
requested changes
Jan 9, 2026
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
Show resolved
Hide resolved
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
Outdated
Show resolved
Hide resolved
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
Outdated
Show resolved
Hide resolved
Fix regenerate statistics logics.
… file instead of deleting the tsfile.
jt2594838
requested changes
Jan 12, 2026
Comment on lines
405
to
407
| for (IChunkMetadata valueChunkMetadata : alignedChunkMetadata.getValueChunkMetadataList()) { | ||
| Statistics<?> statistics = Statistics.getStatsByType(targetDataType); | ||
| statistics = getNewStatistics(valueChunkMetadata, targetDataType, statistics); | ||
|
|
||
| ChunkMetadata newChunkMetadata = (ChunkMetadata) valueChunkMetadata; | ||
| newChunkMetadata.setTsDataType(targetDataType); | ||
| newChunkMetadata.setStatistics(statistics); | ||
| newValueChunkMetadataList.add(newChunkMetadata); | ||
| if (targetDataType.isCompatible(valueChunkMetadata.getDataType())) { |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the target component should be written, not all of them.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
Outdated
Show resolved
Hide resolved
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SchemaUtils.java
Show resolved
Hide resolved
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/utils/SchemaUtilsTest.java
Show resolved
Hide resolved
… to get chunkMetadata current index itself, when execute query statement. Place null value that when chunkMetaData is not compatible with chunkMetadData of target data type
jt2594838
approved these changes
Jan 12, 2026
jt2594838
approved these changes
Jan 12, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.