[
https://issues.apache.org/jira/browse/IGNITE-15080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Iurii Gerzhedovich updated IGNITE-15080:
----------------------------------------
Labels: ignite-2 (was: )
> 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
> Priority: Major
> Labels: ignite-2
> 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)