davsclaus opened a new pull request, #28986:
URL: https://github.com/apache/camel/pull/28986

   Small chore, no JIRA.
   
   **What was wrong:** `ClickHouseProducer.insertList` passed an empty `List` 
body to `Client.insert` (an empty list is never larger than `batchSize`), and 
client-v2 fails it with `Data cannot be empty`. A route that inserts an empty 
result set failed.
   
   **What changed:** an empty `List` is now a 0-row insert. The producer does 
not call the client and sets `CamelClickHouseWrittenRows` to `0`. Since 
`insertBatch` no longer gets an empty batch, its `batch.isEmpty()` guard in the 
error message path is removed.
   
   **Tests:** `ClickHouseProducerTest.insertEmptyListIsZeroRowInsert` replaces 
`insertEmptyListKeepsTheClientErrorAsCause` (which asserted the old failure). 
It stubs the mocked `Client` to throw like client-v2, checks the header is `0` 
and verifies `client.insert` is never called. It fails without the fix. Module 
build with `-Psourcecheck`: 24 unit tests and 5 integration tests pass.
   
   **Docs:** one sentence in `clickhouse-component.adoc` on the empty `List`, 
plus the catalog copy. `@BodyTypes` did not mention empty lists, so it is 
unchanged. No upgrade guide entry: a failing empty insert is nothing a user 
relies on.
   
   _Claude Code on behalf of Claus Ibsen (davsclaus)_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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