Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-19096

Sql. Remove code that replaces placeholder values from ModifyNode.

    XMLWordPrintableJSON

Details

    Description

      It is possible to remove default placeholders altogether and insert default value s for columns at the sql to relnode conversion phase.

      Note
      A) In order to avoid code duplication use TableDescriptorImpl::newColumnDefaultValue.
      B) Calcite generates different RelNode trees for queries INSERT INTO tmp (a) VALUES (1) and INSERT INTO tmp (a, b) VALUES (1, DEFAULT). For the first query calcite supplies DEFAULT values by calling TableDescriptorImpl::newColumnDefaultValue, but for the second query it does not do it.
      C) Since the values operator in Calcite can contain only literals, plans for INSERT statements for tables with implicit primary key and without it are different. When a table has an implicit primary key, Calcite adds a projection operator with a call to gen_random_uuid() and uses values operator as input of that projection.

      Attachments

        Issue Links

          Activity

            People

              zstan Evgeny Stanilovsky
              mzhuravkov Maksim Zhuravkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3.5h
                  3.5h