You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexander Lapin (Jira)" <ji...@apache.org> on 2021/12/23 06:57:00 UTC
[jira] [Commented] (IGNITE-15926) DDL methos for tables should throw an exception when the tables exist or not
[ https://issues.apache.org/jira/browse/IGNITE-15926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17464329#comment-17464329 ]
Alexander Lapin commented on IGNITE-15926:
------------------------------------------
[~v.pyatkov] LGTM
> DDL methos for tables should throw an exception when the tables exist or not
> ----------------------------------------------------------------------------
>
> Key: IGNITE-15926
> URL: https://issues.apache.org/jira/browse/IGNITE-15926
> Project: Ignite
> Issue Type: Bug
> Reporter: Vladislav Pyatkov
> Assignee: Vladislav Pyatkov
> Priority: Major
> Labels: ignite-3
> Time Spent: 6h
> Remaining Estimate: 0h
>
> ANSI standard[1] requires two methods for either table manager functions (DDL):
> _DROP TABLE [ IF EXISTS ] syntax_
> _CREATE TABLE [ IF NOT EXISTS ] syntax_
> _ALTER TABLE [ IF EXISTS ] syntax_
> for implement all these functionalities I offer to handle exceptions (TableAlreadyExistsException, TableNotExistsException)
> {code:java}
> TableManager#dropTable throws TableNotExistsException
> IgniteTables#createTable throws TableAlreadyExistsException
> IgniteTables#alterTable throws TableNotExistsException
> {code}
> Also, the twins of these methods with `IfNotExists` suffix (and them asynchronous analogs) would be removed.
> [1] [https://postgrespro.ru/docs/postgrespro/9.6/sql-altertable]
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)