Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangstar333 committed Sep 28, 2023
1 parent 73858af commit b8e430d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions be/src/pipeline/exec/jdbc_table_sink_operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ namespace doris::pipeline {

JdbcTableSinkOperatorX::JdbcTableSinkOperatorX(const RowDescriptor& row_desc,
const std::vector<TExpr>& 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<JdbcTableSinkLocalState>::init(thrift_sink));
Expand Down
4 changes: 3 additions & 1 deletion be/src/pipeline/pipeline_x/operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,8 @@ Status AsyncWriterSink<Writer, Parent>::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());
}
Expand Down Expand Up @@ -604,5 +605,6 @@ template class PipelineXSinkLocalState<MultiCastDependency>;
template class PipelineXLocalState<PartitionSortDependency>;

template class AsyncWriterSink<doris::vectorized::VFileResultWriter, ResultFileSinkOperatorX>;
template class AsyncWriterSink<doris::vectorized::VJdbcTableWriter, JdbcTableSinkOperatorX>;

} // namespace doris::pipeline

0 comments on commit b8e430d

Please sign in to comment.