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

DEFAULT expression is ignored during INSERT

    XMLWordPrintableJSON

Details

    Description

      II change table.iq a bit and found a problem with processing default column expression:

      CREATE TABLE tdef (i int not null, j int DEFAULT 100);
      (0 rows modified)
      
      !update
      
      INSERT INTO tdef VALUES (1, DEFAULT);
      (1 row modified)
      
      !update
      
      INSERT INTO tdef(i) VALUES (2);
      (1 row modified)
      
      !update
      
      SELECT * FROM tdef ORDER BY i;
      +---+-----+
      | I | J   |
      +---+-----+
      | 1 | 100 |
      | 2 | 100 |
      +---+-----+
      (2 rows)
      
      !ok
      
      but obtain from calcite:
      
      +---+-----+
      | I | J   |
      +---+-----+
      | 1 |     |
      | 2 | 100 |
      +---+-----+
      

      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: