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

Jark Wu closed FLINK-21991.
---------------------------
    Fix Version/s:     (was: 1.13.0)
       Resolution: Invalid

This is by design. We didn't follow the behavior of Calcite. Length 1 is more 
SQL standard compliant. You can see more information in Javadoc of 
{{org.apache.flink.table.types.logical.VarCharType}}.

> flink varchar which exposes to users it not unified
> ---------------------------------------------------
>
>                 Key: FLINK-21991
>                 URL: https://issues.apache.org/jira/browse/FLINK-21991
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Planner
>    Affects Versions: 1.13.0
>            Reporter: jackylau
>            Priority: Major
>
> sql  VARCHAR: If no length is specified, n is equal to 1. which is not right. 
> calcite will transform the varchar to string
> {code:java}
>                     SqlDataTypeSpec type = regularColumn.getType();
>                     boolean nullable = type.getNullable() == null ? true : 
> type.getNullable();
>                     RelDataType relType = type.deriveType(sqlValidator, 
> nullable);
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to