anew commented on code in PR #57365:
URL: https://github.com/apache/spark/pull/57365#discussion_r3627441034
##########
sql/pipelines/src/main/scala/org/apache/spark/sql/pipelines/autocdc/Scd2BatchProcessor.scala:
##########
@@ -811,6 +811,93 @@ case class Scd2BatchProcessor(
staged.select(outputColumns.toImmutableArraySeq: _*)
}
+ /**
+ * Drop delete-encoded rows (tombstones and decomposition tails) that became
redundant after
+ * reconciliation.
+ *
+ * A tombstone or decomposition tail is redundant when the immediately
preceding row's reconciled
+ * [[endAtColName]] equals its own sequence: the preceding upsert already
encodes the delete
+ * boundary, so the standalone delete-encoded row should no longer be routed
to aux.
+ *
+ * For example, an open upsert `[startAt=10, endAt=null)` followed by a
tombstone at `15`
Review Comment:
updated the comments to explain the examples in more detail
--
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]