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

Sergey Kalashnikov commented on IGNITE-5623:
--------------------------------------------

[~tledkov-gridgain], I have reviewed the changes. Overall it looks good, but I 
have few comments:
1) Missing the implementation for Jdbc metadata, namely getColumns(). The 
corresponding column for default value there is "COLUMN_DEF".
2) What will happen if the type of provided default value is not convertible to 
the type of the column? Will the exception occur and when?
3) {GridSqlQueryParser.parseAddColumn()} - Perhaps we should add column name to 
the exception.
4) {BinaryFieldImpl.value()}
You might want to move the check for zero schemaId into fieldOrder() where it 
is used already and return BinarySchema.ORDER_NOT_FOUND.
5) {QueryEntity}
{equals()} and {hashCode()} needs to be updated.





> 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
>            Assignee: Taras Ledkov
>              Labels: important
>             Fix For: 2.4
>
>
> 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)

Reply via email to