You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/07/04 07:32:52 UTC

[GitHub] [doris] yiguolei commented on a diff in pull request #10582: [Bug][Storage] fix default value get wrong result because no implement read_by_rowids

yiguolei commented on code in PR #10582:
URL: https://github.com/apache/doris/pull/10582#discussion_r912707082


##########
be/src/olap/rowset/segment_v2/column_reader.cpp:
##########
@@ -990,15 +992,23 @@ void DefaultValueColumnIterator::insert_default_data(const TypeInfo* type_info,
 
 Status DefaultValueColumnIterator::next_batch(size_t* n, vectorized::MutableColumnPtr& dst,
                                               bool* has_null) {
+    *has_null = _is_default_value_null;
+    _insert_many_default(dst, *n);
+    return Status::OK();
+}
+
+Status DefaultValueColumnIterator::read_by_rowids(const rowid_t* rowids, const size_t count,
+                                                  vectorized::MutableColumnPtr& dst) {
+    _insert_many_default(dst, count);
+    return Status::OK();
+}
+
+void DefaultValueColumnIterator::_insert_many_default(vectorized::MutableColumnPtr& dst, size_t n) {
     if (_is_default_value_null) {
-        *has_null = true;
-        dst->insert_many_defaults(*n);
+        dst->insert_many_defaults(n);

Review Comment:
   has_null is not set?



-- 
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: commits-unsubscribe@doris.apache.org

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


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