2.5.10 ARRAY_DISTINCT 函数偶发BE Crash

为了更快的定位您的问题,请提供以下信息,谢谢
【详述】问题详细描述
有个sql 偶尔会导致BE crash

【背景】做过哪些操作?
【业务影响】
【StarRocks版本】2.5.10
【联系方式】社区群3-杨荣
【附件】

*** Aborted at 1700019561 (unix time) try “date -d @1700019561” if you are using GNU date ***
PC: @ 0x4f69240 starrocks::vectorized::ArrayDistinct<>::_array_distinct_item<>()
*** SIGSEGV (@0x7f2288c00000) received by PID 27723 (TID 0x7f5880903700) from PID 18446744071708868608; stack trace: ***
@ 0x5aed0a2 google::(anonymous namespace)::FailureSignalHandler()
@ 0x7f59d4dc9630 (unknown)
@ 0x4f69240 starrocks::vectorized::ArrayDistinct<>::_array_distinct_item<>()
@ 0x4f69a9a starrocks::vectorized::ArrayDistinct<>::_array_distinct<>()
@ 0x4f69f24 starrocks::vectorized::ArrayFunctions::array_distinct_varchar()
@ 0x3fe0ab4 starrocks::vectorized::VectorizedFunctionCallExpr::evaluate_checked()
@ 0x38ea553 starrocks::ExprContext::evaluate()
@ 0x38ea89f starrocks::ExprContext::evaluate()
@ 0x3009ac4 starrocks::pipeline::ProjectOperator::push_chunk()
@ 0x2d6ab2e starrocks::pipeline::PipelineDriver::process()
@ 0x510747a starrocks::pipeline::GlobalDriverExecutor::_worker_thread()
@ 0x4af5bc2 starrocks::ThreadPool::dispatch_thread()
@ 0x4af06ba starrocks::thread::supervise_thread()
@ 0x7f59d4dc1ea5 start_thread
@ 0x7f59d43dc96d __clone
@ 0x0 (unknown)
crash_sql.txt (7.1 KB)

麻烦提供一下 explain verbose + sql
SUMMARY.relation_listing,SUGGEST.suggest_shipping_method_info的数据类型是什么?

dump_file (49.3 KB) verbose.txt (45.0 KB)
你好,我生成了个verbose 的结果和dump 的结果
其中SUMMARY.relation_listing 的类型是 relation_listing varchar(65533)
SUGGEST.suggest_shipping_method_info 的类型是suggest_shipping_method_info varchar(1048576)

收到 thanks,我们先排查一下

已确定原因是,ARRAY_AGG生成的ARRAY中字符串的长度之和超过4G导致,当前这里没有防御,后面会直接报错。