Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Bug](function)fix json_object function check null nums error as retu…
…rn bool (#44321) ### What problem does this PR solve? Related PR: #https://github.com/apache/doris/pull/34591/files Problem Summary: before the SQL report error, as it error change the simd::count_zero_num function return value static as bool, so it run into the if check of (not_null_num < size). but actual it's maybe return int type. now: ``` mysql [(none)]>select json_object ( CONCAT('k',t.number%30926%3000 + 0),CONCAT('k',t.number%30926%3000 + 0,t.number%1000000) ) from numbers("number" = "2") t order by 1; +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | json_object(concat('k', cast((((number % 30926) % 3000) + 0) as VARCHAR(65533))), concat('k', cast((((number % 30926) % 3000) + 0) as VARCHAR(65533)), cast((number % 1000000) as VARCHAR(65533))), '66') | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | {"k0":"k00"} | | {"k1":"k11"} | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 2 rows in set (0.04 sec) ``` before: ``` mysql [(none)]>select json_object -> ( -> CONCAT('k',t.number%30926%3000 + 0),CONCAT('k',t.number%30926%3000 + 0,t.number%1000000) -> ) -> from numbers("number" = "2") t; ERROR 1105 (HY000): errCode = 2, detailMessage = (10.16.10.8)[INTERNAL_ERROR]function json_object can not input null value , JSON documents may not contain NULL member names. mysql [(none)]> ```
- Loading branch information