imay commented on a change in pull request #2319: Add Bitmap index reader
URL: https://github.com/apache/incubator-doris/pull/2319#discussion_r353027079
 
 

 ##########
 File path: be/src/olap/rowset/segment_v2/column_reader.cpp
 ##########
 @@ -536,17 +518,17 @@ Status DefaultValueColumnIterator::init(const 
ColumnIteratorOptions& opts) {
     return Status::OK();
 }
 
-Status DefaultValueColumnIterator::next_batch(size_t* n, ColumnBlock* dst) {
+Status DefaultValueColumnIterator::next_batch(size_t* n, ColumnBlockView* dst) 
{
+    if (dst->is_nullable()) {
+        dst->set_null_bits(*n, _is_default_value_null);
+    }
+
     if (_is_default_value_null) {
-        for (int i = 0; i < *n; ++i) {
-            dst->set_is_null(i, true);
-        }
+        dst->advance(*n);
     } else {
         for (int i = 0; i < *n; ++i) {
-            memcpy(dst->mutable_cell_ptr(i), _mem_value.data(), _value_size);
-            if (dst->is_nullable()) {
-                dst->set_is_null(i, false);
-            }
+            memcpy(dst->data(), _mem_value.data(), _value_size);
+            dst->advance(1);
 
 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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to