AnishMahto opened a new pull request, #55995:
URL: https://github.com/apache/spark/pull/55995

   Approved AutoCDC SPIP: 
https://lists.apache.org/thread/j6sj9wo9odgdpgzlxtvhoy7szs0jplf7
   
   --------
   
   This is a stacked PR. Review incremental diff here: 
SPARK-56249-merge-tombstones-onto-microbatch...SPARK-56923-SCD1-merge-microbatch-onto-auxiliary
   
   --------
   
   **Preamble:**
   
   The SCD type 1 flow is a foreachBatch streaming query on an input 
change-data-feed, and is responsible for reconciling the incoming change data 
onto some target table that follows SCD1 replication semantics.
   
   SCD1 flows also maintain an "auxiliary" table to keep track of 
early-arriving out-of-order received events state. Each microbatch will need to 
reconcile against this auxiliary table as well, and update the auxiliary 
table's state appropriately for future microbatches.
   
    
   
   **Merge Microbatch onto Auxiliary:**
   
   The auxiliary table should be updated such that;
   
   Stale tombstones (delete events now succeeded by upserts/deletes in the 
incoming microbatch) should be removed from the auxiliary table. They will 
never be meaningful for SCD1 again.
   New tombstones introduced in the incoming microbatch should be persisted in 
the auxiliary table, for future microbatches to reconcile agianst.
   Implement this update operation as a MERGE. 


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