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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #66780
   
   Problem Summary:
   
   Cherry-pick of #66780 to branch-4.1. When a Parquet scalar column is read 
directly into the destination column 
(`read_directly_into_dst_logical_column()`), `read_column_data` moves the 
caller's only `ColumnPtr` into `resolved_column`; if any read step returns 
before `convert()` moves it back (for example when the scan is stopped), the 
caller is left with a null column and the BE crashes. The fix restores 
ownership with a `Defer` on every early return, exactly as on master.
   
   Conflict resolution: on branch-4.1 `read_column_data` ends with `return 
_converter->convert(...)` directly, so the last hunk becomes `return 
convert_column();` (master has `RETURN_IF_ERROR(convert_column()); … return 
Status::OK();`) — same behaviour.
   
   The unit test from #66780 is carried over as a standalone file, 
`parquet_scalar_column_reader_test.cpp`: the file it extends on master 
(`parquet_column_chunk_reader_test.cpp`) and the lazy-dictionary fixtures it 
builds on (#66000) are not on branch-4.1, so the test brings the minimal 
in-memory column-chunk fixture it needs.
   
   ### Release note
   
   Fix a BE crash when a Parquet read into a nested scalar column is 
interrupted before the column is converted.
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test: 
`ParquetScalarColumnReaderTest.NestedReadRestoresColumnWhenStopped` 
(`be/test/format/parquet/parquet_scalar_column_reader_test.cpp`)
       - [ ] 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
   
   - Behavior changed:
       - [x] No.
       - [ ] Yes.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label


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