palashc commented on PR #2057:
URL: https://github.com/apache/phoenix/pull/2057#issuecomment-2616689565

   @haridsv Thanks for the illustration, it looks good and captures what I was 
trying to say. 
   
   > At any point, we need to look up the parent record(s) for the current 
region only to update the end time, right? 
   
   Yes. That is correct. 
   
   > I see you are looking up the parent of the parent (grand parents) during 
merge instead of the immediate parents Is this intentional?
   
   > You are looking up both the parents and grand parents during split and 
updating their timestamp. Why grand parent too?
   
   I am looking up the grandparent only because the **grandparent id will be a 
part of the PK for the rows for the parent**. In your illustration, when ABCD 
splits, I want to know all its parents i.e. AB and CD. Then, we need to update 
the end time for all rows of ABCD i.e. (ABCD, AB) and (ABCD, CD). Hence when 
querying for the parent, I also include the grandparent in the query so that 
later on I can provide the complete PK to update the end time.  
   
   > For parents during split, why to lookup by start/end key, why not the same 
way as in merge? We are anyway not using the start/end key to constrain the 
rows to upsert for end time.
   
   The merge coproc hook provides all parents and the daughter. The split 
coproc hook only provides the daughters, not the parents. So we will have to 
lookup by the start/end key. 


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

Reply via email to