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 2020/04/29 12:54:20 UTC

[GitHub] [incubator-doris] EmmyMiao87 opened a new pull request #3436: Fix the error result when assert num rows node is used

EmmyMiao87 opened a new pull request #3436:
URL: https://github.com/apache/incubator-doris/pull/3436


   The child.open() function is not called before this commit.
   If the assert num rows node has child which process data in open function, the assert num rows node will fetch no data from child.
   So the result will be empty(incorrect).
   
   This error only appear in inner subquery which has a aggregation function.
   For example, select * from table where k1=(select k1 from (select avg(k1) from table) a);
   The first level of subquery returns a non-scalar value, so the assert num rows node is needed.
   The second level of subquery has a aggregation function, so the child of assert node is aggregate node.
   However, if the open stage of the aggregate node is not called, the get next state of aggregate node will return empty set.
   So the result is wrong.
   Fixed #3435.
   
   Change-Id: I45f3eda0fbd2e0723aa4185a2d8a3459135a2d37


----------------------------------------------------------------
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:
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] EmmyMiao87 commented on a change in pull request #3436: Fix the error result when assert num rows node is used

Posted by GitBox <gi...@apache.org>.
EmmyMiao87 commented on a change in pull request #3436:
URL: https://github.com/apache/incubator-doris/pull/3436#discussion_r417731508



##########
File path: be/src/exec/assert_num_rows_node.cpp
##########
@@ -45,6 +45,7 @@ Status AssertNumRowsNode::prepare(RuntimeState* state) {
 Status AssertNumRowsNode::open(RuntimeState* state) {
     SCOPED_TIMER(_runtime_profile->total_time_counter());
     RETURN_IF_ERROR(ExecNode::open(state));
+    RETURN_IF_ERROR(child(0)->open(state));

Review comment:
       Added. Actually, I think most of expr node should call the child.open in open function. This is my mistake.




----------------------------------------------------------------
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:
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] kangkaisen commented on a change in pull request #3436: Fix the error result when assert num rows node is used

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on a change in pull request #3436:
URL: https://github.com/apache/incubator-doris/pull/3436#discussion_r417377285



##########
File path: be/src/exec/assert_num_rows_node.cpp
##########
@@ -45,6 +45,7 @@ Status AssertNumRowsNode::prepare(RuntimeState* state) {
 Status AssertNumRowsNode::open(RuntimeState* state) {
     SCOPED_TIMER(_runtime_profile->total_time_counter());
     RETURN_IF_ERROR(ExecNode::open(state));
+    RETURN_IF_ERROR(child(0)->open(state));

Review comment:
       Would better add a comment or this issue link to let other people know why and when to call child(0)->open method. Thanks.




----------------------------------------------------------------
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:
users@infra.apache.org



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