shizy818 commented on code in PR #14616:
URL: https://github.com/apache/iotdb/pull/14616#discussion_r1909700499
##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/datastructure/TVList.java:
##########
@@ -252,27 +406,22 @@ protected void releaseLastTimeArray() {
}
public int delete(long lowerBound, long upperBound) {
- int newSize = 0;
- maxTime = Long.MIN_VALUE;
+ int deletedNumber = 0;
+ long maxTime = Long.MIN_VALUE;
+ long minTime = Long.MAX_VALUE;
for (int i = 0; i < rowCount; i++) {
long time = getTime(i);
- if (time < lowerBound || time > upperBound) {
- set(i, newSize++);
+ if (time >= lowerBound && time <= upperBound) {
+ int originRowIndex = getValueIndex(i);
+ int arrayIndex = originRowIndex / ARRAY_SIZE;
+ int elementIndex = originRowIndex % ARRAY_SIZE;
+ markNullValue(arrayIndex, elementIndex);
+ deletedNumber++;
Review Comment:
ok
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]