You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Sergey Antonov (JIRA)" <ji...@apache.org> on 2018/10/12 15:05:00 UTC

[jira] [Updated] (IGNITE-9873) SQL: MERGE requires column names specified explicitly

     [ https://issues.apache.org/jira/browse/IGNITE-9873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Antonov updated IGNITE-9873:
-----------------------------------
    Description: 
Doc ([https://apacheignite-sql.readme.io/docs/merge]) defines MERGE operator:
{noformat}
MERGE INTO tableName [(columnName [,...])]
  [KEY (columnName [,...])]
  {VALUES {({ DEFAULT | expression } [,...])} [,...] | select}
{noformat}
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.
{noformat}
CREATE TABLE TEST (ID LONG PRIMARY KEY, VAL LONG);
MERGE INTO TEST VALUES (1, 2);
{noformat}
But command below works well though:
{noformat}
MERGE INTO TEST (ID, VAL) VALUES (1, 2);
{noformat}

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

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

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.

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

But command below works well though:
{noformat}
MERGE INTO TEST (ID, VAL) VALUES (1, 2);
{noformat}


> SQL: MERGE requires column names specified explicitly 
> ------------------------------------------------------
>
>                 Key: IGNITE-9873
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9873
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Pavel Kuznetsov
>            Priority: Minor
>
> Doc ([https://apacheignite-sql.readme.io/docs/merge]) defines MERGE operator:
> {noformat}
> MERGE INTO tableName [(columnName [,...])]
>   [KEY (columnName [,...])]
>   {VALUES {({ DEFAULT | expression } [,...])} [,...] | select}
> {noformat}
> 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.
> {noformat}
> CREATE TABLE TEST (ID LONG PRIMARY KEY, VAL LONG);
> MERGE INTO TEST VALUES (1, 2);
> {noformat}
> But command below works well though:
> {noformat}
> MERGE INTO TEST (ID, VAL) VALUES (1, 2);
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)