924060929 commented on PR #63229:
URL: https://github.com/apache/doris/pull/63229#issuecomment-4853008245

   The path convention should be: each `*`/field segment descends exactly one 
level, and a trailing `OFFSET`/`NULL` applies to the level reached:
   
   - `[m, *, OFFSET]`    = offset of the **value array** (one `*` → into the 
map value)
   - `[m, *, *, OFFSET]` = offset of the **array item** (two `*` → into the 
array element)
   
   So `[m, *, OFFSET]` is unambiguous, and **BE should honor it regardless of 
whether FE splits the path**. If BE routes that OFFSET down to the array *item* 
and fails, BE is violating the one-level-per-segment rule — a BE bug to fix in 
BE.
   
   And BE already implements this: #61888 (2026-04-03) gave the map reader's 
`ACCESS_ALL` branch "key fully read + OFFSET applies only to the value", with a 
regression test `MapAccessAllWithOffsetDoesNotPropagateOffsetToKey` — ~6 weeks 
before this PR.
   
   That leaves two possibilities, and this PR is questionable under both:
   
   1. If BE already resolves `[m, *, OFFSET]` correctly, then the failure 
observed here was **not** "OFFSET routed to an array item child" — the stated 
root cause is wrong, and this PR masks a different, still-unidentified problem.
   2. If value=array genuinely still misbehaves in BE (the regression test only 
covers value=string, `length(map['k'])`), then the fix belongs in BE — add 
value=array handling — not FE.
   
   To be clear: emitting KEYS+VALUES from FE is fine in itself (it's clearer 
and it helps the FE strip logic). The problem is doing it *as a workaround for 
BE not honoring `[m, *, OFFSET]`*. BE must satisfy the one-level-per-segment 
rule independently; a FE bypass premised on a BE limitation either hides the 
real root cause (case 1) or papers over a BE bug that should be fixed (case 2).
   


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