EmmyMiao87 commented on a change in pull request #3485:
URL: https://github.com/apache/incubator-doris/pull/3485#discussion_r421213698
##########
File path: be/src/exec/assert_num_rows_node.cpp
##########
@@ -56,12 +62,46 @@ Status AssertNumRowsNode::get_next(RuntimeState* state,
RowBatch* output_batch,
output_batch->reset();
child(0)->get_next(state, output_batch, eos);
_num_rows_returned += output_batch->num_rows();
- if (_num_rows_returned > _desired_num_rows) {
- LOG(INFO) << "Expected no more than " << _desired_num_rows << " to be
returned by expression "
- << _subquery_string;
- return Status::Cancelled(strings::Substitute(
- "Expected no more than $0 to be returned by
expression $1",
- _desired_num_rows, _subquery_string));
+ bool assert_res = false;
+ switch (_assertion) {
Review comment:
Pay attention to code alignment
##########
File path: be/src/exec/assert_num_rows_node.cpp
##########
@@ -17,19 +17,25 @@
#include "exec/assert_num_rows_node.h"
+#include "gen_cpp/PlanNodes_types.h"
+#include "gutil/strings/substitute.h"
#include "runtime/row_batch.h"
#include "runtime/runtime_state.h"
#include "util/runtime_profile.h"
-#include "gen_cpp/PlanNodes_types.h"
-#include "gutil/strings/substitute.h"
namespace doris {
-AssertNumRowsNode::AssertNumRowsNode(
- ObjectPool* pool, const TPlanNode& tnode, const DescriptorTbl& descs) :
- ExecNode(pool, tnode, descs),
- _desired_num_rows(tnode.assert_num_rows_node.desired_num_rows),
- _subquery_string(tnode.assert_num_rows_node.subquery_string) {
+AssertNumRowsNode::AssertNumRowsNode(ObjectPool* pool, const TPlanNode& tnode,
+ const DescriptorTbl& descs)
+ : ExecNode(pool, tnode, descs),
+ _desired_num_rows(tnode.assert_num_rows_node.desired_num_rows),
+ _subquery_string(tnode.assert_num_rows_node.subquery_string) {
+ if (tnode.assert_num_rows_node.__isset.assertion) {
+ _assertion = tnode.assert_num_rows_node.assertion;
+ }
Review comment:
Pay attention to code alignment
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]