Hongyang66666 opened a new pull request, #58656:
URL: https://github.com/apache/doris/pull/58656

   ## Proposed changes
   
   Issue Number: close #58523
   
   ### Problem
   When upgrading Doris from older versions to newer versions, legacy data 
might contain empty jsonb values (where `size` is 0).
   
   The current strict validation in `checkAndCreateDocument` throws an 
`InvalidArgument` error ("Invalid JSONB document: too small size(0)") when 
encountering such data. This causes critical failures during the compaction 
process.
   
   ### Fix
   Modify `be/src/util/jsonb_document.h` to add a compatibility check.
   If `size == 0`, the function now returns `Status::OK()` (treating it as a 
valid empty/null object) instead of throwing an error. This ensures compaction 
and queries can proceed normally on legacy data.
   
   ## Check List
   - [x] The code has been compiled and tested locally.
   - [x] This PR fixes a bug.
   - [ ] This PR refactors code.
   - [ ] This PR adds a new feature.


-- 
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