Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-27795

SqlValidatorException when insert null value

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.14.4
    • None
    • Table SQL / API
    • None

    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);
      [ERROR] Could not execute SQL statement. Reason:
      org.apache.calcite.sql.validate.SqlValidatorException: Illegal use of 'NULL'

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              linqichen178 linqichen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: