[
https://issues.apache.org/jira/browse/PHOENIX-7283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nikita Pande updated PHOENIX-7283:
----------------------------------
Description:
Currently phoenix returns cast result as the complete string instead of n
number of characters passed
eg
0: jdbc:phoenix:> select cast('asdf' as char(2)) ;
+-----------------+
|TO_CHAR('asdf')|
+-----------------+
|asdf |
+-----------------+
Whereas in *MySQL*
SELECT cast('asdf' as char(2));
Number of Records: 1
||cast('asdf' as char(2))||
|as|
was:
Currently phoenix returns cast result as the complete string instead of n
number of characters passed
eg
0: jdbc:phoenix:> select cast('asdf' as char(2)) ;
+-----------------+
| TO_CHAR('asdf') |
+-----------------+
| asdf |
+-----------------+
Whereas in MySQL
```
SELECT cast('asdf' as char(2));
Number of Records: 1
||cast('asdf' as char(2))||
|as|
```
> select cast as char does not return the n number of characters as char(n)
> -------------------------------------------------------------------------
>
> Key: PHOENIX-7283
> URL: https://issues.apache.org/jira/browse/PHOENIX-7283
> Project: Phoenix
> Issue Type: Bug
> Reporter: Nikita Pande
> Priority: Major
> Attachments: Screenshot 2024-03-17 at 11.12.25 PM.png
>
>
> Currently phoenix returns cast result as the complete string instead of n
> number of characters passed
> eg
> 0: jdbc:phoenix:> select cast('asdf' as char(2)) ;
> +-----------------+
> |TO_CHAR('asdf')|
> +-----------------+
> |asdf |
> +-----------------+
>
> Whereas in *MySQL*
> SELECT cast('asdf' as char(2));
> Number of Records: 1
> ||cast('asdf' as char(2))||
> |as|
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)