This is an automated email from the ASF dual-hosted git repository. zhangstar333 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new ca9a294e8df [Bug](partition) report error when insert NULL value to not null column (#39413) ca9a294e8df is described below commit ca9a294e8dfc2f38080a61bddd21d266b8c09ef3 Author: zhangstar333 <87313068+zhangstar...@users.noreply.github.com> AuthorDate: Wed Aug 21 19:38:42 2024 +0800 [Bug](partition) report error when insert NULL value to not null column (#39413) ## Proposed changes the reason of coredump is wants insert into NULL value to Not Null column. add check for it to return error, not core dump directly. ``` *** Query id: 2aab82e54467463c-9199d0d4e01d9d80 *** *** is nereids: 1 *** *** tablet id: 0 *** *** Aborted at 1723634603 (unix time) try "date -d @1723634603" if you are using GNU date *** *** Current BE git commitID: c51e786d95 *** *** SIGSEGV address not mapped to object (@0x0) received by PID 3730849 (TID 3743347 OR 0x7f3f55d39700) from PID 0; stack trace: *** 0# doris::signal::(anonymous namespace)::FailureSignalHandler(int, siginfo_t*, void*) at /mnt/disk2/zhangfurong/doris/be/src/common/signal_handler.h:421 1# PosixSignals::chained_handler(int, siginfo*, void*) [clone .part.0] in /mnt/disk2/zhangfurong/jdk-17.0.10/lib/server/libjvm.so 2# JVM_handle_linux_signal in /mnt/disk2/zhangfurong/jdk-17.0.10/lib/server/libjvm.so 3# 0x00007F44F517F5B0 in /lib64/libc.so.6 4# doris::vectorized::ColumnVector<long>::insert_data(char const*, unsigned long) at /mnt/disk2/zhangfurong/doris/be/src/vec/columns/column_vector.h:168 5# doris::VOlapTablePartitionParam::_create_partition_keys(std::vector<doris::TExprNode, std::allocator<doris::TExprNode> > const&, std::pair<doris::vectorized::Block*, int>*) at /mnt/disk2/zhangfurong/doris/be/src/exec/tablet_info.cpp:534 6# doris::VOlapTablePartitionParam::generate_partition_from(doris::TOlapTablePartition const&, doris::VOlapTablePartition*&) at /mnt/disk2/zhangfurong/doris/be/src/exec/tablet_info.cpp:553 7# doris::VOlapTablePartitionParam::init() at /mnt/disk2/zhangfurong/doris/be/src/exec/tablet_info.cpp:404 8# doris::pipeline::ExchangeSinkLocalState::open(doris::RuntimeState*) at /mnt/disk2/zhangfurong/doris/be/src/pipeline/exec/exchange_sink_operator.cpp:187 9# doris::pipeline::PipelineTask::_open() at /mnt/disk2/zhangfurong/doris/be/src/pipeline/pipeline_task.cpp:209 10# doris::pipeline::PipelineTask::execute(bool*) at /mnt/disk2/zhangfurong/doris/be/src/pipeline/pipeline_task.cpp:312 11# doris::pipeline::TaskScheduler::_do_work(unsigned long) at /mnt/disk2/zhangfurong/doris/be/src/pipeline/task_scheduler.cpp:138 12# doris::ThreadPool::dispatch_thread() in /mnt/disk2/zhangfurong/doris-current/be/lib/doris_be 13# doris::Thread::supervise_thread(void*) at /mnt/disk2/zhangfurong/doris/be/src/util/thread.cpp:499 14# start_thread in /lib64/libpthread.so.0 15# __GI___clone in /lib64/libc.so.6 ``` <!--Describe your changes.--> --- be/src/exec/tablet_info.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/be/src/exec/tablet_info.cpp b/be/src/exec/tablet_info.cpp index a8efbd338a3..3d73bf1bd88 100644 --- a/be/src/exec/tablet_info.cpp +++ b/be/src/exec/tablet_info.cpp @@ -515,6 +515,11 @@ static Status _create_partition_key(const TExprNode& t_expr, BlockRow* part_key, } case TExprNodeType::NULL_LITERAL: { // insert a null literal + if (!column->is_nullable()) { + // https://github.com/apache/doris/pull/39449 have forbid this cause. always add this check as protective measures + return Status::InternalError("The column {} is not null, can't insert into NULL value.", + part_key->first->get_by_position(pos).name); + } column->insert_data(nullptr, 0); break; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org