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

   ## Proposed changes
   
   The query SELECT v["a"]["b"] from simple_var WHERE cast(v["a"]["b"] as int) 
= 1
   
   1. During the binding stage, the expression element_at(var, "xxx") is 
transformed into a SlotReference with a specified path. This conversion is 
tracked in the StatementContext, where the parent slot is the primary key and 
the paths are secondary keys. This structure, known as subColumnSlotRefMap in 
the StatementContext, helps to eliminate duplicates of the same slot derived 
from identical paths.
   2. A new rule, BindSlotWithPaths, is introduced in the analysis stage. This 
rule is responsible for converting slots with paths into their respective slot 
suppliers. To ensure that slots with paths are correctly associated with the 
appropriate LogicalOlapScan, an additional mapping, slotToRelation, is added to 
the StatementContext. This mapping links the top-level slot to its 
corresponding relation (i.e., LogicalOlapScan). Consequently, subsequent slots 
with paths can determine the correct LogicalOlapScan to merge with and modify 
accordingly.
   
   Issue Number: close #xxx
   
   <!--Describe your changes.-->
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 
[d...@doris.apache.org](mailto:d...@doris.apache.org) by explaining why you 
chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to