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

Pavel Pereslegin edited comment on IGNITE-19305 at 5/4/23 8:03 AM:
-------------------------------------------------------------------

Since we don't support the "drop behavior" feature, we decided to restrict 
deletion of indexed columns. Proposed behavior is similar to MS SQL Server, but 
not to Oracle/Postgresql which support the "drop behavior" feature.


was (Author: xtern):
Since we don't support the "drop behavior" feature, we need to restrict 
deletion of indexed columns. Proposed behavior is similar to MS SQL Server, but 
not to Oracle/Postgresql which support the "drop behavior" feature.

> Index alive after drop indexed column
> -------------------------------------
>
>                 Key: IGNITE-19305
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19305
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 3.0
>            Reporter: Alexander Belyak
>            Assignee: Pavel Pereslegin
>            Priority: Major
>              Labels: ignite-3
>
> In 
> [documentation|https://ignite.apache.org/docs/3.0.0-beta/sql-reference/ddl#alter-table-if-exists-table-drop-column-if-exists-column1-column2-int]
>  I see: "If the column was indexed, the index has to be dropped manually in 
> advance by using the 'DROP INDEX' command." But it seems like an alpha 
> version limitation.
> Unable to create index with the same name after dropping indexed column:
> {noformat}
> create table tindex(
> id int primary key,
> v1 int, 
> v2 int);
> create index titest on tindex(v1, v2)
> alter table tindex drop column v1;
> create index titest on tindex(v2);{noformat}
> error:
> {noformat}
> [Code: 0, SQL State: 50000]  Exception while executing query [query=create 
> index titest on tindex(v2)]. Error message:IGN-SQL-17 
> TraceId:5f61df67-cc61-4eb1-98be-3bbaa25a7c44 IGN-SQL-17 
> TraceId:5f61df67-cc61-4eb1-98be-3bbaa25a7c44 Index already exists 
> [name="PUBLIC"."TITEST"]{noformat}
> Expected behaviour:
> 1) index titest drop while dropping v1 columnd
> 2) index titest successfully created on the last DDL operation.



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

Reply via email to