-
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 or a drop tag statement on the tree 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
base: master
Are you sure you want to change the base?
Conversation
…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
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
… 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.
| 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); | ||
| } |
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.
No need to process DATE especially?
| Arrays.asList(TSDataType.TEXT, TSDataType.BLOB) | ||
| .contains(chunkMetadata.getDataType()) | ||
| ? "" | ||
| : chunkMetadata.getStatistics().getMinValue().toString(), | ||
| StandardCharsets.UTF_8); |
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.
Why are you checking the data type of the chunk metadata again, now that it is in the switch clause?
| binaryValues[0] = new Binary("", StandardCharsets.UTF_8); | ||
| binaryValues[1] = new Binary("", StandardCharsets.UTF_8); |
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.
May creaete a constant as a placeholder for this.
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.