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/05/17 08:21:06 UTC

[GitHub] [incubator-doris] cambyzju opened a new pull request, #9612: [BUG] fix information_schema.columns results not correctly on vec engine

cambyzju opened a new pull request, #9612:
URL: https://github.com/apache/incubator-doris/pull/9612

   # Proposed changes
   
   Issue Number: close #9597
   
   ## Problem Summary:
   There are two bugs in function VSchemaScanNode::get_next:
   1. first loop we clean columns by columns.clear(), next loop columns.empty() is true, then filter_block will not be called and makes the results wrong.
   2. if all rows filtered by filter_block, `block->columns() > 0 and block->rows() == 0`, next loop we should not call `block->insert` again, we should reuse the column.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   3. Has unit tests been added: (Yes/No/No Need)
   4. Has document been added or modified: (Yes/No/No Need)
   5. Does it need to update dependencies: (Yes/No)
   6. 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] [incubator-doris] github-actions[bot] commented on pull request #9612: [BUG] fix information_schema.columns results not correctly on vec engine

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

   PR approved by at least one committer 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] [incubator-doris] github-actions[bot] commented on pull request #9612: [BUG] fix information_schema.columns results not correctly on vec engine

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

   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] [incubator-doris] cambyzju commented on a diff in pull request #9612: [BUG] fix information_schema.columns results not correctly on vec engine

Posted by GitBox <gi...@apache.org>.
cambyzju commented on code in PR #9612:
URL: https://github.com/apache/incubator-doris/pull/9612#discussion_r874566823


##########
be/src/vec/exec/vschema_scan_node.cpp:
##########
@@ -69,12 +69,14 @@ Status VSchemaScanNode::get_next(RuntimeState* state, vectorized::Block* block,
     if (!_is_init) return Status::InternalError("used before initialize.");
     RETURN_IF_ERROR(exec_debug_action(TExecNodePhase::GETNEXT));
     RETURN_IF_CANCELLED(state);
-    bool mem_reuse = block->mem_reuse();
-    DCHECK(block->rows() == 0);
     std::vector<vectorized::MutableColumnPtr> columns(_slot_num);
     bool schema_eos = false;
 
     do {
+        bool mem_reuse = block->mem_reuse();

Review Comment:
   Now there are no filter inside do-while loop in mysql and odbc scan node, we will never go to next loop with block->rows==0.
   
   For feature plan, I think we should better refractor mem_resue to reduce the risk of incorrectly using.



-- 
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] [incubator-doris] morningman commented on a diff in pull request #9612: [BUG] fix information_schema.columns results not correctly on vec engine

Posted by GitBox <gi...@apache.org>.
morningman commented on code in PR #9612:
URL: https://github.com/apache/incubator-doris/pull/9612#discussion_r874547335


##########
be/src/vec/exec/vschema_scan_node.cpp:
##########
@@ -69,12 +69,14 @@ Status VSchemaScanNode::get_next(RuntimeState* state, vectorized::Block* block,
     if (!_is_init) return Status::InternalError("used before initialize.");
     RETURN_IF_ERROR(exec_debug_action(TExecNodePhase::GETNEXT));
     RETURN_IF_CANCELLED(state);
-    bool mem_reuse = block->mem_reuse();
-    DCHECK(block->rows() == 0);
     std::vector<vectorized::MutableColumnPtr> columns(_slot_num);
     bool schema_eos = false;
 
     do {
+        bool mem_reuse = block->mem_reuse();

Review Comment:
   For  mysql and odbc scan node, why we don't need to move this line in the loop?



-- 
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] [incubator-doris] yiguolei merged pull request #9612: [BUG] fix information_schema.columns results not correctly on vec engine

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


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