You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2026/09/26 17:09:19 UTC

[PR] [core] Stop write-selector recursion in format table builder [paimon]

LuciferYang opened a new pull request, #10213:
URL: https://github.com/apache/paimon/pull/10213

   ### Purpose
   
   `FormatBatchWriteBuilder.newWriteSelector()` delegated to `table.newBatchWriteBuilder().newWriteSelector()`, but a `FormatTable`'s batch write builder is `FormatBatchWriteBuilder` itself, so the call rebuilt the same builder and re-entered the same method. Every invocation recursed without a base case and failed with a `StackOverflowError`.
   
   Format tables have no bucket or write selection, so the builder now returns `Optional.empty()`, which the `WriteBuilder` contract defines as "no data distribution is required" and which matches the answer the file-store builder gives for bucket-unaware and postpone modes.
   
   ### Tests
   
   Adds `FormatTableCompatibilityTest.testNewWriteSelectorIsEmptyInsteadOfRecursing`, which pins `newBatchWriteBuilder().newWriteSelector()` to an empty `Optional` so the recursion cannot come back.
   
   ### API and Format
   
   No.
   
   ### Documentation
   
   No.
   


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [core] Stop write-selector recursion in format table builder [paimon]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #10213:
URL: https://github.com/apache/paimon/pull/10213#issuecomment-5945006223

   Closing. The StackOverflowError is real, but newWriteSelector() has no in-tree caller. Spark and Flink write planning never call it for format tables, and the PR itself notes there is no in-tree caller today. With no reachable path this is hardening of a public API, not a fix for anything a user hits, so I would rather not carry it.


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [core] Stop write-selector recursion in format table builder [paimon]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang closed pull request #10213: [core] Stop write-selector recursion in format table builder
URL: https://github.com/apache/paimon/pull/10213


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org