You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2017/09/08 11:43:00 UTC

[jira] [Comment Edited] (IGNITE-5648) DDL: NOT NULL constraint support for CREATE TABLE operator

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

Vladimir Ozerov edited comment on IGNITE-5648 at 9/8/17 11:42 AM:
------------------------------------------------------------------

[~skalashnikov], my comments:
1) I made several minor changes, please review my recent commits.
2) Please double-check how does {{ALTER TABLE}} change {{QueryTypeDescriptorImpl}}. Is this class mutable and gets changed on {{ALTER TABLE}} command, or is it immutable and gets replaced instead?
3) {{QueryTypeDescriptorImpl.validateProps}} - a little bit concerned from performance perspective. This method will be very hot, so we need to make sure that no allocations are made here. I am afraid iteration over {{HashSet}} would produce new iterators. Can we replace it with {{ArrayList}}?
4) Test for {{ALTER TABLE}} should execute some real operations (e.g. {{INSERT}}) to make sure that property is applied and error is thrown. In fact, I would suggest you to move these tests to  {{IgniteSqlNotNullConstraintTest}} - first test cache operations over existing not-null column, then add another one through {{ALTER TABLE}}, then test cache operations against this column again. This way we will ensure that {{ALTER TABLE ... NOT NULL}} tested properly in all possible modes.


was (Author: vozerov):
[~skalashnikov], my comments:
1) I made several minor changes, please review my recent commits.
2) Please double-check how does {{ALTER TABLE}} change {{QueryTypeDescriptorImpl}}. Is this class mutable and gets changed on {{ALTER TABLE}} command, or is it immutable and gets replaced instead?
3) {{QueryTypeDescriptorImpl.validateProps}} - a little bit concerned from performance perspective. This method will be very hot, so we need to make sure that no allocations are made here. I am afraid iteration over {{HashSet}} would produce new iterators. Can we replace it with {{ArrayList}}?
4) Test for {{ALTER TABLE}} should execute some real operations (e.g. {{INSERT}}) to make sure that property is applied and error is thrown. In fact, I would suggest you to move these tests to  {{IgniteSqlNotNullConstraintTest}} - first test cache operations over existing not-null column, then add another one through {{ALTER TABLE}}, then test cache operations against this column again. This way we will ensure that {{ALTER TABLE ... NOT NULL}} tested properly in all possible modes.
5) 

> DDL: NOT NULL constraint support for CREATE TABLE operator
> ----------------------------------------------------------
>
>                 Key: IGNITE-5648
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5648
>             Project: Ignite
>          Issue Type: New Feature
>          Components: sql
>    Affects Versions: 2.0
>            Reporter: Denis Magda
>            Assignee: Sergey Kalashnikov
>             Fix For: 2.3
>
>
> This is an umbrella ticket intended to aggregate all the activities related to {{NOT NULL}} constraint support for {{CREATE TABLE}} commands.
> {code}
> CREATE TABLE legs(legid INT NOT NULL);
> {code}
> Ignite must prevent setting {{legid}} to {{null}} value.
> The feature has to be supported for:
> * ODBC and JDBC drivers.
> * Native APIs (Java, .NET, C++)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)