Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6192

DEFAULT expression with NULL value throws unexpected exception

    XMLWordPrintableJSON

Details

    Description

      Processing of DEFAULT expression was improved in scope of [1] but seems there is one case with NULL as value is not covered and processed erroneously.

      create table tdef1 (i int not null, col1 int default null);
      insert into tdef1(i, col1) values (1, DEFAULT);
      

      throws :

      Error while executing SQL "insert into tdef1(i, col1) values (1, DEFAULT)": class org.apache.calcite.sql.SqlLiteral: NULL
      

      [1] https://issues.apache.org/jira/browse/CALCITE-5950

      Attachments

        Issue Links

          Activity

            People

              zstan Evgeny Stanilovsky
              zstan Evgeny Stanilovsky
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: