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

   `outputType=StreamList` makes the body a `ResultSetIterator`. The option's 
description says the result is streamed *"using an Iterator"* and *"can be used 
with the Splitter EIP in streaming mode"* — accurate, but it stops one sentence 
short of the consequence: the body has no size and can be read only once. 
Anyone who then treats it as a list gets an error that never mentions the 
option they chose:
   
   ```
   org.apache.camel.component.bean.MethodNotFoundException: Method with name: 
size() not found on bean:
   org.apache.camel.component.sql.ResultSetIterator@1bdc4d7c
   ```
   
   Measured while benchmarking how well a local model writes Camel routes. A 
step that selects the rows of a table, logs `${body.size()}` and splits the 
list was written 30 times across three 10-pass runs, with the model free to 
choose `outputType`:
   
   | choice | outcome |
   |---|---|
   | `SelectList`, or no `outputType` | worked |
   | `StreamList` | **failed 8 times out of 8**, always on `${body.size()}` |
   
   It reads that the result is an Iterator for the Splitter, picks it, and 
sizes the body anyway. So the description isn't wrong — it just doesn't say 
what follows from the choice, which is the part an author needs.
   
   The added sentence reaches the catalog, the component page and every tool 
that reads them:
   
   > The body is then a ResultSetIterator and not a List: it has no size, and 
it can only be read once, so split it to work on the rows instead of calling 
`size()` or indexing it. Use `SelectList` when the whole result is wanted as a 
List of Map.
   
   Same shape as CAMEL-25040: the catalog names an option but not its 
consequence. Documentation only — no behaviour change. The regenerated 
component json, catalog json and endpoint-DSL builder are included, from a full 
reactor build.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01Bp3538HRBPMQkb5ta9xRaj
   


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