You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/12/08 15:36:00 UTC

[jira] [Commented] (CAMEL-18437) Camel-bigquery: There is a difference in types between @name and ${name}

    [ https://issues.apache.org/jira/browse/CAMEL-18437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17644875#comment-17644875 ] 

Claus Ibsen commented on CAMEL-18437:
-------------------------------------

Jiri, are you able to work on this in the near future for the upcoming 3.20 release. Otherwise it may slip into 3.21

> Camel-bigquery: There is a difference in types between @name and ${name}
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-18437
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18437
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-google-bigquery
>    Affects Versions: 3.19.0
>            Reporter: Jiri Ondrusek
>            Assignee: Jiri Ondrusek
>            Priority: Major
>             Fix For: 3.20.0
>
>
> I noticed a undefined behavior when expanding coverage of google-bigquery in camel-quarkus ([ticket|https://github.com/apache/camel-quarkus/issues/3949]).
>  
> Here is a relevant chapter from the [documentation|#_uri_format].]
>  
> {quote} * 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{quote}
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)