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

   ### What problem does this PR solve?
   
   Fix variant subpath pruning for projections where the top-level expression 
is an array subscript or `element_at` over a variant subpath. The planner could 
leave the outer subscript on the original variant access chain after pruning, 
which made valid 1-based array subscripts return `NULL`.
   
   CIR-20316's original array-of-objects repro depends on nested-group variant 
semantics, but the planner bug is not nested-group-specific. This PR adds both 
a nested-group regression and a plain `VARIANT` array-leaf regression.
   
   Issue Number: CIR-20316
   
   ### Check List
   
   - [x] Added regression tests
   - [x] Added FE planner unit test
   
   ### Tests
   
   - `./run-fe-ut.sh --run 
org.apache.doris.nereids.rules.rewrite.VariantPruningLogicTest`
   - `./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d 
variant_p0 -s test_variant_array_subscript_cir_20316`
   - `./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d 
variant_p0/nested_group -s test_variant_nested_array_subscript_cir_20316`
   


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