ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay Izhikov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-6055) SQL: Add String length constraint
Date Tue, 08 May 2018 09:02:00 GMT

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

Nikolay Izhikov commented on IGNITE-6055:
-----------------------------------------

[~vozerov]

I propose following design for this issue and IGNITE-8331:

1. We should reject with exceptoin {{UPDATE}} and {{INSERT}} statements that violates fields
constraint.
2. We should truncate existing data when returning {{SELECT} results.

3. We should introduce system property to enable/disable behaviour described in 1, 2. (to
preserve compatibility with current behaviour). {{ENABLE_COLUMN_CONSTRAINTS}}. Default value
until 3.0 is {{false}}.

> SQL: Add String length constraint
> ---------------------------------
>
>                 Key: IGNITE-6055
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6055
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>    Affects Versions: 2.1
>            Reporter: Vladimir Ozerov
>            Assignee: Nikolay Izhikov
>            Priority: Major
>              Labels: sql-engine
>
> We should support {{CHAR(X)}} and {{VARCHAR{X}} syntax. Currently, we ignore it. First,
it affects semantics. E.g., one can insert a string with greater length into a cache/table
without any problems. Second, it limits efficiency of our default configuration. E.g., index
inline cannot be applied to {{String}} data type as we cannot guess it's length.



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

Mime
View raw message