szehon-ho commented on code in PR #58209:
URL: https://github.com/apache/spark/pull/58209#discussion_r3833439714
##########
sql/pipelines/src/test/scala/org/apache/spark/sql/pipelines/autocdc/Scd2ForeachBatchHandlerSuite.scala:
##########
@@ -715,6 +715,71 @@ class Scd2ForeachBatchHandlerSuite
checkAnswer(auxTable, auxRow(1, null, 20L, 20L, 20L, 2L))
}
+ test("the auxiliary merge's own writes do not duplicate the rows the target
merge reads") {
Review Comment:
Nice test. One gap: both copies here sit at `startAt = 5`, so only the
`endAt` key is exercised. The `startAt` key takes precedence and is
load-bearing in the case where the microbatch moves the run head, so the aux
copy carries a different run start than the target copy.
That case does resolve correctly as far as I can tell - a tie makes
`nextRecordStartAt == recordStartAt < endAt`, so a closed copy sorting first
always decomposes and its tail preserves the boundary, while a closed copy
sorting last survives intact - but there is no test behind it. Would be good to
cover.
--
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]