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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to