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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Problem Summary: Nested `array_map` expressions can capture variables from 
an outer lambda while also defining their own lambda arguments. The BE 
previously assigned lambda argument column offsets by recursively mutating 
every `VColumnRef` under the outer lambda. This could make an inner lambda 
argument reuse the outer lambda block offset and read the wrong column during 
`INSERT ... SELECT`, causing a BE crash. This change serializes lambda argument 
metadata to BE, preserves captured input columns in lambda blocks, and assigns 
offsets only to the current lambda's formal arguments while respecting 
nested-lambda shadowing.
   
   ### Release note
   
   Fix a BE crash for nested `array_map` expressions that capture outer lambda 
variables.
   
   ### Check List (For Author)
   
   - Test:
       - Manual test: `./build.sh --be --fe`
       - Regression test: `./run-regression-test.sh --conf 
output/local-regression/regression-conf-19700.groovy --run -d 
query_p0/sql_functions/array_functions -s test_nested_array_map_insert 
-forceGenOut`
       - Regression test: `./run-regression-test.sh --conf 
output/local-regression/regression-conf-19700.groovy --run -d 
query_p0/sql_functions/array_functions -s test_nested_array_map_insert`
       - Format check: `./build-support/clang-format.sh`; 
`./build-support/check-format.sh`; `git diff --check`
       - Static analysis: attempted `./build-support/run-clang-tidy.sh 
--build-dir be/build_Release`, but local clang-tidy analysis was blocked by 
pre-existing/toolchain diagnostics outside this change.
   - Behavior changed: No
   - Does this need documentation: No
   


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