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 06:38:46 UTC

[GitHub] [doris] BiteTheDDDDt opened a new pull request, #10582: [Bug][Storage] fix default value get wrong result because no implement read_by_rowids

BiteTheDDDDt opened a new pull request, #10582:
URL: https://github.com/apache/doris/pull/10582

   # Proposed changes
   
   Issue Number: close #10563
   
   ## Problem Summary:
   
   Describe the overview of changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
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


[GitHub] [doris] yiguolei merged pull request #10582: [Bug][Storage] fix default value get wrong result because no implement read_by_rowids

Posted by GitBox <gi...@apache.org>.
yiguolei merged PR #10582:
URL: https://github.com/apache/doris/pull/10582


-- 
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


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

Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #10582:
URL: https://github.com/apache/doris/pull/10582#discussion_r912885701


##########
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:
   The input of function `read_by_rowids` does not contain `has_null`, so it is no needed.



-- 
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


[GitHub] [doris] github-actions[bot] commented on pull request #10582: [Bug][Storage] fix default value get wrong result because no implement read_by_rowids

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #10582:
URL: https://github.com/apache/doris/pull/10582#issuecomment-1173469199

   PR approved by anyone and no changes requested.


-- 
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


[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

Posted by GitBox <gi...@apache.org>.
yiguolei commented on code in PR #10582:
URL: https://github.com/apache/doris/pull/10582#discussion_r912855900


##########
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:
   read_by_rowids also use _insert_many_default, should it be 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


[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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #10582:
URL: https://github.com/apache/doris/pull/10582#discussion_r912708766


##########
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:
   set it at line 995



-- 
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