You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Matvei Kalistratov (Jira)" <ji...@apache.org> on 2025/09/03 14:09:00 UTC

[jira] [Assigned] (IGNITE-15080) Calcite. Functions extends string parameters by trailing spaces

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

Matvei Kalistratov reassigned IGNITE-15080:
-------------------------------------------

    Assignee: Iurii Gerzhedovich

> 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: Iurii Gerzhedovich
>            Assignee: Iurii Gerzhedovich
>            Priority: Major
>             Fix For: 2.18
>
>
> 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.20.10#820010)