From b8e430ddc062c8fa4be3990eef763e53b497dd8c Mon Sep 17 00:00:00 2001 From: zhangstar333 <2561612514@qq.com> Date: Thu, 28 Sep 2023 13:03:07 +0800 Subject: [PATCH] update --- be/src/pipeline/exec/jdbc_table_sink_operator.cpp | 4 +--- be/src/pipeline/pipeline_x/operator.cpp | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/be/src/pipeline/exec/jdbc_table_sink_operator.cpp b/be/src/pipeline/exec/jdbc_table_sink_operator.cpp index 5ae2446557cebe..a551762027337e 100644 --- a/be/src/pipeline/exec/jdbc_table_sink_operator.cpp +++ b/be/src/pipeline/exec/jdbc_table_sink_operator.cpp @@ -32,9 +32,7 @@ namespace doris::pipeline { JdbcTableSinkOperatorX::JdbcTableSinkOperatorX(const RowDescriptor& row_desc, const std::vector& t_output_expr) - : DataSinkOperatorX(0), _row_desc(row_desc), _t_output_expr(t_output_expr) { - _name = "JdbcTableSink"; -} + : DataSinkOperatorX(0), _row_desc(row_desc), _t_output_expr(t_output_expr) {} Status JdbcTableSinkOperatorX::init(const TDataSink& thrift_sink) { RETURN_IF_ERROR(DataSinkOperatorX::init(thrift_sink)); diff --git a/be/src/pipeline/pipeline_x/operator.cpp b/be/src/pipeline/pipeline_x/operator.cpp index 79f7553009d4e6..c6331b04fbe53e 100644 --- a/be/src/pipeline/pipeline_x/operator.cpp +++ b/be/src/pipeline/pipeline_x/operator.cpp @@ -511,7 +511,8 @@ Status AsyncWriterSink::close(RuntimeState* state, Status exec_s return Status::OK(); } COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->write_watcher_elapse_time()); - if (_writer->need_normal_close()) { + // if the init failed, the _writer may be nullptr. so here need check + if (_writer && _writer->need_normal_close()) { if (exec_status.ok() && !state->is_cancelled()) { RETURN_IF_ERROR(_writer->commit_trans()); } @@ -604,5 +605,6 @@ template class PipelineXSinkLocalState; template class PipelineXLocalState; template class AsyncWriterSink; +template class AsyncWriterSink; } // namespace doris::pipeline