This is an automated email from the ASF dual-hosted git repository.
hellostephen 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 23ebed28c4f [fix](beut) fix beut core when input invalid json string
(#51512)
23ebed28c4f is described below
commit 23ebed28c4f2569a0e8c9caa9c32df70490fefb9
Author: Mryange <[email protected]>
AuthorDate: Thu Jun 5 14:40:47 2025 +0800
[fix](beut) fix beut core when input invalid json string (#51512)
### What problem does this PR solve?
https://github.com/apache/doris/pull/51423
```
expected result: F20250605 12:16:20.879859 2837347 column_string.h:137]
Check failed: n < size() (16 vs. 16)
*** Check failure stack trace: ***
@ 0x55b957286746 google::LogMessage::SendToLog()
@ 0x55b957283190 google::LogMessage::Flush()
@ 0x55b957286f89 google::LogMessageFatal::~LogMessageFatal()
@ 0x55b909690b5c doris::vectorized::ColumnStr<>::get_data_at()
@ 0x55b93cea4fae doris::vectorized::DataTypeJsonb::to_string()
@ 0x55b919fdd0d5 doris::vectorized::check_function<>()
@ 0x55b919d915cc
doris::vectorized::FunctionJsonbTEST_JsonbParseNotnullErrorToInvalidTest_Test::TestBody()
@ 0x55b957a6d90b
testing::internal::HandleSehExceptionsInMethodIfSupported<>()
@ 0x55b957a67769
testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0x55b957a3e13a testing::Test::Run()
@ 0x55b957a3eb5e testing::TestInfo::Run()
@ 0x55b957a3f41e testing::TestSuite::Run()
@ 0x55b957a4eade testing::internal::UnitTestImpl::RunAllTests()
@ 0x55b957a6e756
testing::internal::HandleSehExceptionsInMethodIfSupported<>()
@ 0x55b957a68761
testing::internal::HandleExceptionsInMethodIfSupported<>()
@ 0x55b957a4d2d3 testing::UnitTest::Run()
@ 0x55b90ceb77d3 RUN_ALL_TESTS()
```
---
be/test/vec/function/function_test_util.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/be/test/vec/function/function_test_util.cpp
b/be/test/vec/function/function_test_util.cpp
index 742587831f5..0d57d1b423c 100644
--- a/be/test/vec/function/function_test_util.cpp
+++ b/be/test/vec/function/function_test_util.cpp
@@ -375,10 +375,11 @@ bool insert_cell(MutableColumnPtr& column, DataTypePtr
type_ptr, const AnyType&
case PrimitiveType::TYPE_JSONB: {
auto str = any_cast<ut_type::STRING>(cell);
JsonBinaryValue jsonb_val;
- if (!jsonb_val.init_from_json_string(str.c_str(),
str.size()).ok()) {
- return false;
+ if (jsonb_val.init_from_json_string(str.c_str(), str.size()).ok())
{
+ column->insert_data(jsonb_val.value(), jsonb_val.size());
+ } else {
+ column->insert_data(nullptr, 0);
}
- column->insert_data(jsonb_val.value(), jsonb_val.size());
break;
}
case PrimitiveType::TYPE_BITMAP: {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]