zhangstar333 opened a new pull request, #44321:
URL: https://github.com/apache/doris/pull/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 change the simd::count_zero_num function 
return value as bool,
   so it run into the if check of (not_null_num < size).
   
   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)]>
   
   ```
   
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [x] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [x] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to