Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Won't Do
-
3.19.0
-
None
-
Unknown
Description
I noticed a undefined behavior when expanding coverage of google-bigquery in camel-quarkus (ticket).
Here is a relevant chapter from the documentation.]
- parameters in form ${name} are extracted from message headers and formed the translated query
- parameters in form @name are extracted from body or message headers and sent to Google Bigquery
From my PoV is that in case of parameters in the header, it should not matter, whether @name or ${name} is used.
The behavior seems to be more complicated:
- In case of @name pattern, value types are dynamically resolved (see https://issues.apache.org/jira/browse/CAMEL-18382 for more details)
- In case of ${name}, value is inserted into the sql without any modification. Which behaves like "undefined".
- If header value is an integer (like 4), sql is translated into ... VALUES (4) ..., so it is interpreted as integer.
- If header value is string with number inside (like "4"), sql is translated into ... VALUES (4) ..., so it is interpreted as integer.
- If the header is string (like "s4"), sql is translated into ... VALUES (s4) ..., and the execution fails.
It would make sense that the behavior of @name and ${name} is the same and mainly the case 3 does not cause any failure.