[
https://issues.apache.org/jira/browse/IGNITE-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16292367#comment-16292367
]
Vladimir Ozerov commented on IGNITE-5623:
-----------------------------------------
Design considerations:
1) At this point we should support only constants, i.e. no functional stuff
2) Default values should be assigned from both SQL and cache operations
3) May be it should not be applicable to key fields and affinity key fields
(because in case of key-value access we would have wrong affinity). Need to
investigate further.
Looks like we need to hack mostly the same places as in IGNITE-5648. See commit
*43be051* (12 Sep 2017).
> DDL needs to support DEFAULT operator
> --------------------------------------
>
> Key: IGNITE-5623
> URL: https://issues.apache.org/jira/browse/IGNITE-5623
> Project: Ignite
> Issue Type: Task
> Components: sql
> Affects Versions: 2.0
> Reporter: Denis Magda
> Labels: important
>
> There should be a way to set a default value for a column/field if the one is
> not specified during an insert operation. In general, we need to support
> {{<field> DEFAULT <value>}} in a way it's show below:
> {code}
> CREATE TABLE Persons (
> ID int,
> FirstName varchar(255),
> Age int,
> City varchar(255) DEFAULT 'Sandnes'
> );
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)