You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Marios Trivyzas (Jira)" <ji...@apache.org> on 2021/09/30 08:57:00 UTC
[jira] [Created] (FLINK-24413) Casting to a CHAR() and VARCHAR()
doesn't trip the string to the specified precision
Marios Trivyzas created FLINK-24413:
---------------------------------------
Summary: Casting to a CHAR() and VARCHAR() doesn't trip the string to the specified precision
Key: FLINK-24413
URL: https://issues.apache.org/jira/browse/FLINK-24413
Project: Flink
Issue Type: Sub-task
Components: Table SQL / API
Reporter: Marios Trivyzas
*CAST**('abcdfe' AS CHAR(3))* should trim the string to 3 chars but currently returns the whole string *'abcdfe'*.
PostgreSQL for example does this:
postgres=# select '123456afas'::char(4);
bpchar
--------
1234
(1 row)
postgres=# select '123456afas'::varchar(5);
varchar
---------
12345
(1 row)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)