[ 
https://issues.apache.org/jira/browse/IGNITE-15080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Plekhanov reassigned IGNITE-15080:
------------------------------------------

    Assignee: Aleksey Plekhanov

> Calcite. Functions extends string parameters by trailing spaces
> ---------------------------------------------------------------
>
>                 Key: IGNITE-15080
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15080
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Yury Gerzhedovich
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>
> I discovered the strange behavior of functions with several string 
> parameters, which then returns one of these parameters. In this case, the 
> returned parameter string is expanded with trailing spaces to the length of 
> the longest string.
> {code:java}
> query T
> SELECT COALESCE(COALESCE(null, 'world'), 'blabla')
> ----
> world  - result is 'world ' - so we have extra trailing spaces from max 
> length string parameter'blabla'{code}
> {code:java}
> query I
> SELECT DECODE(102, 101, 'IBM', 102, 'GRIDGAIN', 103, 'Hewlett Packard','BALL')
> ----
> GRIDGAIN   - result is 'GRIDGAIN       ' - so we have extra traiing spaces 
> from max length string parameter 'Hewlett Packard'{code}
> see src/test/sql/function/generic/test_decode.test_ignore
> seeĀ src/test/sql/function/generic/test_coalesce.test_ignore



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to