[ 
https://issues.apache.org/jira/browse/IGNITE-19691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17742008#comment-17742008
 ] 

Alexander Belyak commented on IGNITE-19691:
-------------------------------------------

Now DDL script:
{code:java}
create table test(id int primary key, val int);
alter table test drop column if exists val; {code}
returns expected error:
{noformat}
[Code: 0, SQL State: 50000]  Exception while executing query [query=alter table 
test drop column if exists val]. Error message:Failed to parse query: 
Encountered "" at line 1, column 30.
Was expecting one of:
{noformat}

> Drop column ignore "if exists" clause
> -------------------------------------
>
>                 Key: IGNITE-19691
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19691
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 3.0
>         Environment: AI3, commit id 612f08f6 on 08.06.2023 at 15:01
>            Reporter: Alexander Belyak
>            Priority: Major
>              Labels: ignite-3
>
> Scenario:
> 1) create table
> 2) drop some columns
> 3) drop same columns with "if exists"
> Expected results: execute without errors;
> Actual results: last ddl instruction return SQLException
>  
> {noformat}
> create table tA(v0 INTEGER, c2 INTEGER, v1 INTEGER, c1 INTEGER not null, 
> primary key (c1, c2));
> alter table tA drop column (v0, v1);
> alter table tA drop column if exists (v0, v1);{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to