You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/07/09 07:11:07 UTC
[GitHub] [incubator-doris] morningman commented on a change in pull request
#1447: Fix bug that BE crashs when insert null value to the not null column
morningman commented on a change in pull request #1447: Fix bug that BE crashs when insert null value to the not null column
URL: https://github.com/apache/incubator-doris/pull/1447#discussion_r301424891
##########
File path: be/src/exec/olap_table_sink.cpp
##########
@@ -640,14 +640,25 @@ void OlapTableSink::_convert_batch(RuntimeState* state, RowBatch* input_batch, R
#else
state->append_error_msg_to_file("", ss.str());
#endif
- continue;
+ exist_null_value_for_not_null_col = true;
+ break;
}
}
void* slot = dst_tuple->get_slot(slot_desc->tuple_offset());
RawValue::write(src_val, slot, slot_desc->type(), _output_batch->tuple_data_pool());
}
+
+ if (!exist_null_value_for_not_null_col) {
+ if (output_batch->add_row() != RowBatch::INVALID_ROW_INDEX) {
+ commit_rows++;
+ output_batch->get_row(i)->set_tuple(0, dst_tuple);
+ } else {
+ // input_batch and output_batch's capacity must be same.
+ DCHECK(false);
Review comment:
You should add ERROR info for this DCHECK.
Like: DCHECK(false) << "input_batch and output_batch's capacity must be same. " << input size << '', " << output size;
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org