[jira] [Commented] (IGNITE-17996) Strange behavior of SQL CASE expression

2022-11-02 Thread Yury Gerzhedovich (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-17996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17627611#comment-17627611
 ] 

Yury Gerzhedovich commented on IGNITE-17996:


[~akhitrin] , in case we agree that's not a bug let's close the ticket.

> Strange behavior of SQL CASE expression
> ---
>
> Key: IGNITE-17996
> URL: https://issues.apache.org/jira/browse/IGNITE-17996
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta1
>Reporter: Andrey Khitrin
>Priority: Major
>  Labels: ignite-3
>
> I observe strange behavior in the next scenario:
>  
> {code:java}
> sql-cli> create table xx (f1 int primary key);
> Updated 0 rows.
> sql-cli> insert into xx values (1);
> Updated 1 rows.
> sql-cli> insert into xx values (2);
> Updated 1 rows.
> sql-cli> select f1, case when f1 < 2 then 'foo' else 'barbar' end as s, 
> length(case when f1 < 2 then 'foo' else 'barbar' end) as ls from xx;
> ╔╤╤╗
> ║ F1 │ S      │ LS ║
> ╠╪╪╣
> ║ 2  │ barbar │ 6  ║
> ╟┼┼╢
> ║ 1  │ foo    │ 6  ║
> ╚╧╧╝
>  {code}
> I expect `CASE` to return 'foo' value, but de-facto it returns 'foo   ' 
> ('foo' with 3 whitespaces at the end).  Seems like this should be fixed.
>  



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


[jira] [Commented] (IGNITE-17996) Strange behavior of SQL CASE expression

2022-10-27 Thread Konstantin Orlov (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-17996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17625171#comment-17625171
 ] 

Konstantin Orlov commented on IGNITE-17996:
---

Please see the comments to the IGNITE-17997

> Strange behavior of SQL CASE expression
> ---
>
> Key: IGNITE-17996
> URL: https://issues.apache.org/jira/browse/IGNITE-17996
> Project: Ignite
>  Issue Type: Bug
>Affects Versions: 3.0.0-beta1
>Reporter: Andrey Khitrin
>Priority: Major
>
> I observe strange behavior in the next scenario:
>  
> {code:java}
> sql-cli> create table xx (f1 int primary key);
> Updated 0 rows.
> sql-cli> insert into xx values (1);
> Updated 1 rows.
> sql-cli> insert into xx values (2);
> Updated 1 rows.
> sql-cli> select f1, case when f1 < 2 then 'foo' else 'barbar' end as s, 
> length(case when f1 < 2 then 'foo' else 'barbar' end) as ls from xx;
> ╔╤╤╗
> ║ F1 │ S      │ LS ║
> ╠╪╪╣
> ║ 2  │ barbar │ 6  ║
> ╟┼┼╢
> ║ 1  │ foo    │ 6  ║
> ╚╧╧╝
>  {code}
> I expect `CASE` to return 'foo' value, but de-facto it returns 'foo   ' 
> ('foo' with 3 whitespaces at the end).  Seems like this should be fixed.
>  



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