[
https://issues.apache.org/jira/browse/FLINK-27795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
linqichen updated FLINK-27795:
------------------------------
Description:
Hello , I found a problem, when i try to insert null value.
i think it is very common to insert null to string type value. We should solve
this instead of using cast (xx as string)
-----------------------------------------------------------------
Flink SQL> create table print_1(
> name string
> ) with(
> 'connector'='print'
> );
[INFO] Execute statement succeed.
Flink SQL> insert into print_1 (name) values (null);
{color:#de350b}*[ERROR] Could not execute SQL statement. Reason:*{color}
{color:#de350b}*org.apache.calcite.sql.validate.SqlValidatorException: Illegal
use of 'NULL'*{color}
was:
i found a problem, when i try to insert null value.
i think it is very common to insert null to string value. We should solve this
instead of using cast (xx as string)
-----------------------------------------------------------------
Flink SQL> create table print_1(
> name string
> ) with(
> 'connector'='print'
> );
[INFO] Execute statement succeed.
Flink SQL> insert into print_1 (name) values (null);
{color:#de350b}*[ERROR] Could not execute SQL statement. Reason:*{color}
{color:#de350b}*org.apache.calcite.sql.validate.SqlValidatorException: Illegal
use of 'NULL'*{color}
> SqlValidatorException when insert null value
> --------------------------------------------
>
> Key: FLINK-27795
> URL: https://issues.apache.org/jira/browse/FLINK-27795
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / API
> Affects Versions: 1.14.4
> Reporter: linqichen
> Priority: Major
>
> Hello , I found a problem, when i try to insert null value.
> i think it is very common to insert null to string type value. We should
> solve this instead of using cast (xx as string)
> -----------------------------------------------------------------
> Flink SQL> create table print_1(
> > name string
> > ) with(
> > 'connector'='print'
> > );
> [INFO] Execute statement succeed.
> Flink SQL> insert into print_1 (name) values (null);
> {color:#de350b}*[ERROR] Could not execute SQL statement. Reason:*{color}
> {color:#de350b}*org.apache.calcite.sql.validate.SqlValidatorException:
> Illegal use of 'NULL'*{color}
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)