diff --git a/be/src/vec/sink/writer/vtablet_writer.cpp b/be/src/vec/sink/writer/vtablet_writer.cpp index 51e80a615e..1e6b8f7b86 100644 --- a/be/src/vec/sink/writer/vtablet_writer.cpp +++ b/be/src/vec/sink/writer/vtablet_writer.cpp @@ -1027,7 +1027,13 @@ static void* periodic_send_batch(void* writer) { } Status VTabletWriter::open(doris::RuntimeState* state, doris::RuntimeProfile* profile) { - RETURN_IF_ERROR(_init(state, profile)); + // if we set enable_decimal_conversion=false && disable_decimalv2=false in config + // and we create nested type with decimal like array + // nereids planner will throw exception with precision should in (0, 27], but real precision is 28 + // but in 2.1 we can fall back to old planner which make this behavior possible + // so in _init() we will meet slot has decimalv2 type with has precision 28 and exception will + // throw from func check_type_precision() , so here we catch exception to avoid be core. + RETURN_IF_ERROR_OR_CATCH_EXCEPTION(_init(state, profile)); signal::set_signal_task_id(_load_id); SCOPED_TIMER(profile->total_time_counter()); SCOPED_TIMER(_open_timer); diff --git a/be/src/vec/sink/writer/vtablet_writer_v2.cpp b/be/src/vec/sink/writer/vtablet_writer_v2.cpp index 6013e31609..3bdc486f05 100644 --- a/be/src/vec/sink/writer/vtablet_writer_v2.cpp +++ b/be/src/vec/sink/writer/vtablet_writer_v2.cpp @@ -247,7 +247,13 @@ Status VTabletWriterV2::_init(RuntimeState* state, RuntimeProfile* profile) { } Status VTabletWriterV2::open(RuntimeState* state, RuntimeProfile* profile) { - RETURN_IF_ERROR(_init(state, profile)); + // if we set enable_decimal_conversion=false && disable_decimalv2=false in config + // and we create nested type with decimal like array + // nereids planner will throw exception with precision should in (0, 27], but real precision is 28 + // but in 2.1 we can fall back to old planner which make this behavior possible + // so in _init() we will meet slot has decimalv2 type with has precision 28 and exception will + // throw from func check_type_precision() , so here we catch exception to avoid be core. + RETURN_IF_ERROR_OR_CATCH_EXCEPTION(_init(state, profile)); LOG(INFO) << "opening olap table sink, load_id=" << print_id(_load_id) << ", txn_id=" << _txn_id << ", sink_id=" << _sender_id; _timeout_watch.start();