You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/11/11 11:40:49 UTC

[GitHub] [iotdb] JackieTien97 commented on a change in pull request #4358: [IOTDB-1990] Fix uncheck null result by calling IReaderByTimestamp

JackieTien97 commented on a change in pull request #4358:
URL: https://github.com/apache/iotdb/pull/4358#discussion_r747425985



##########
File path: server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithValueFilter.java
##########
@@ -118,7 +118,7 @@ private boolean cacheRowRecords() throws IOException {
 
       // 3. use values in results to fill row record
       for (int j = 0; j < cachedTimeCnt; j++) {
-        if (results[j] == null) {
+        if (results == null || results[j] == null) {

Review comment:
       It seems that only when `cachedTimeCnt` equals to zero, `getValuesInTimestamps` will return null. However, if `cachedTimeCnt` equals to zero, we will `return false` before here.

##########
File path: server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithValueFilter.java
##########
@@ -199,7 +199,7 @@ private boolean cacheRowInObjects() throws IOException {
 
       // 3. use values in results to fill row record
       for (int j = 0; j < cachedTimeCnt; j++) {
-        if (results[j] != null) {
+        if (results != null && results[j] != null) {

Review comment:
       Same as above.




-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org