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

   # Description
   
   Fixes [CAMEL-27191](https://issues.apache.org/jira/browse/CAMEL-27191).
   
   `GoogleBigQueryProducer.createRowRequest` cast the value of the 
`useAsInsertId` field to `String`, so a numeric id (such as an `Integer` or 
`Long` order id from a parsed JSON row) failed the exchange with a 
`ClassCastException`.
   
   It now uses the `toString()` of the value. I did not use the Camel type 
converter here, because the rows of a `List` body are passed to 
`createRowRequest` without an exchange (the insert id header is not applied to 
them), and `useAsInsertId` is exactly the option for those rows.
   
   Tests in `GoogleBigQueryProducerTest`: an `Integer` id field in a `Map` 
body, and `Long` id fields in a `List` body. Both fail with the 
`ClassCastException` without the fix.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   https://issues.apache.org/jira/browse/CAMEL-27191
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
   
   # AI-assisted contributions
   
   - [x] This PR was prepared with the help of Claude (Anthropic), credited 
with a `Co-authored-by` trailer in the commit.


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