This is an automated email from the ASF dual-hosted git repository.

hui pushed a commit to branch lmh/extendFilter
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit b2141492e9dfa966799d6cbef71c048b4c7d0373
Author: Minghui Liu <[email protected]>
AuthorDate: Tue Dec 5 16:16:41 2023 +0800

    add comments
---
 .../main/java/org/apache/iotdb/tsfile/read/filter/operator/Not.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Not.java
 
b/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Not.java
index b1b8af0f22b..1f8e71f03b5 100644
--- 
a/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Not.java
+++ 
b/iotdb-core/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Not.java
@@ -45,7 +45,7 @@ public class Not extends Filter {
   }
 
   public Not(ByteBuffer buffer) {
-    this(Filter.deserialize(buffer));
+    this.filter = Objects.requireNonNull(Filter.deserialize(buffer), "filter 
cannot be null");
   }
 
   @Override
@@ -60,11 +60,15 @@ public class Not extends Filter {
 
   @Override
   public boolean canSkip(IMetadata metadata) {
+    // [not filter.canSkip(block)] is not equivalent to 
[notFilter.canSkip(block)]
+    // e.g. block min = 5, max = 15, filter = [value > 10], notFilter = [value 
<= 10)]
+    //  not filter.canSkip(block) = true (expected false), 
notFilter.canSkip(block) = false
     throw new IllegalArgumentException(CONTAIN_NOT_ERR_MSG + this);
   }
 
   @Override
   public boolean allSatisfy(IMetadata metadata) {
+    // same as canSkip
     throw new IllegalArgumentException(CONTAIN_NOT_ERR_MSG + this);
   }
 

Reply via email to