hongzhi-gao commented on code in PR #18533:
URL: https://github.com/apache/iotdb/pull/18533#discussion_r3877507296
##########
iotdb-client/client-cpp/src/session/Session.cpp:
##########
@@ -413,6 +413,83 @@ bool SessionUtils::isTabletContainsSingleDevice(Tablet
tablet) {
return true;
}
+static bool isColumnAllNull(const BitMap& bitMap, size_t rowSize) {
+ if (rowSize == 0) {
+ return false;
+ }
+ if (bitMap.getSize() == rowSize && bitMap.isAllMarked()) {
+ return true;
+ }
+ for (size_t row = 0; row < rowSize; row++) {
+ if (!bitMap.isMarked(row)) {
+ return false;
+ }
+ }
+ return true;
+}
Review Comment:
BitMap is sized to maxRowNumber, not rowSize. When rowSize < maxRowNumber,
tail bits are unmarked, so isAllMarked() returns false even if all active rows
are null. We only use it when getSize() == rowSize.
--
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]