developer-rpai opened a new pull request, #18385:
URL: https://github.com/apache/iceberg/pull/18385

   Implements the DSv2 Transaction API for the Spark connector, per the Spark 
4.2 feature tracker (https://github.com/apache/iceberg/issues/17959). 
Sub-issue: https://github.com/apache/iceberg/issues/18384
   
   SparkCatalog now implements Spark 4.2's TransactionalCatalogPlugin, adding 
beginTransaction(TransactionInfo). New package-private SparkTransaction stages 
per-table Iceberg transactions lazily with an ACTIVE/COMMITTED/ABORTED/CLOSED 
state machine: commit() commits each staged transaction, abort()/close() 
discard staged state (close auto-aborts when still active), and all operations 
throw IllegalStateException once inactive. New TransactionSparkCatalog wraps 
transaction.catalog() with read-your-writes loadTable semantics and declares 
Spark 4.2's checked exceptions.
   
   Test plan: new TestSparkTransaction with 9 tests, all passing via a javac 
plus JUnit harness against real Spark 4.2.0 and Iceberg 1.12.0 jars (commit 
visibility, abort discards, close-aborts-active, empty commit, double-commit 
guard, post-close guards, scan registration, staged table load, 
beginTransaction wiring). Note the spark/v4.2 module targets unreleased Spark, 
so the repo CI build is the real confirmation. The three new files compile with 
zero errors; remaining module errors are pre-existing and unrelated.
   
   Design questions for reviewers: partial-commit behavior when one staged 
transaction fails, scan reuse across staged transactions, and whether to 
declare SupportsAtomicV2Writes.
   
   Disclosure: this contribution was prepared with AI assistance (agentic 
coding tooling) and reviewed by the author before submission.
   


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