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

SQL: MERGE requires column names specified explicitly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • Docs Required

    Description

      Doc (https://apacheignite-sql.readme.io/docs/merge) defines MERGE operator:

      MERGE INTO tableName [(columnName [,...])]
        [KEY (columnName [,...])]
        {VALUES {({ DEFAULT | expression } [,...])} [,...] | select}
      

      So square brackets tell us columnName part can ben ommited. But in this case we'll have parsing error.

      How to reproduce:
      execute sql script via any api.

      CREATE TABLE TEST (ID LONG PRIMARY KEY, VAL LONG);
      MERGE INTO TEST VALUES (1, 2);
      

      But command below works well though:

      MERGE INTO TEST (ID, VAL) VALUES (1, 2);
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            pkouznet Pavel Kuznetsov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: