[jira] [Commented] (IGNITE-7293) "BinaryObjectException: Cannot find schema for object with compact footer" when "not null" field is defined

2018-08-14 Thread Stanilovsky Evgeny (JIRA)


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

Stanilovsky Evgeny commented on IGNITE-7293:


can`t reproduce in master:

{code:java}
execute("CREATE TABLE \"Person2\" (\"id\" int, \"city\" varchar," +
" \"name\" varchar, \"surname\" varchar, \"age\" int not null, 
PRIMARY KEY (\"id\", \"city\")) WITH " +
"wrap_key,wrap_value,\"template=cache,affinity_key='city'\"");
{code}

{code:java}
[2018-08-14 17:17:55,243][ERROR][main][root] Test failed.
class org.apache.ignite.internal.processors.query.IgniteSQLException: Null 
value is not allowed for column 'age'
at 
org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateKeyAndValue(QueryTypeDescriptorImpl.java:547)
at 
org.apache.ignite.internal.processors.query.h2.dml.UpdatePlan.processRow(UpdatePlan.java:277)
{code}

> "BinaryObjectException: Cannot find schema for object with compact footer" 
> when "not null" field is defined
> ---
>
> Key: IGNITE-7293
> URL: https://issues.apache.org/jira/browse/IGNITE-7293
> Project: Ignite
>  Issue Type: Bug
>  Components: binary, sql
>Affects Versions: 2.3
>Reporter: Kirill Shirokov
>Assignee: Vladimir Ozerov
>Priority: Major
>  Labels: sql-stability
> Fix For: 2.7
>
>
> If the following test:
> org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest#testAffinityKey
> is modified by adding "not null" constraint to "age" column definition in 
> Person2 table:
> {noformat}
> execute("CREATE TABLE \"Person2\" (\"id\" int, \"city\" 
> varchar," +
> " \"name\" varchar, \"surname\" varchar, \"age\" int not 
> null, PRIMARY KEY (\"id\", \"city\")) WITH " +
> 
> "wrap_key,wrap_value,\"template=cache,affinity_key='city'\"");}}
> {noformat}
> The test fails with the following stack trace during INSERT operation:
> {noformat}
> class org.apache.ignite.binary.BinaryObjectException: Cannot find schema for 
> object with compact footer [typeId=-1199546406, schemaId=0]
>   at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.getOrCreateSchema(BinaryReaderExImpl.java:2020)
>   at 
> org.apache.ignite.internal.binary.BinaryObjectImpl.createSchema(BinaryObjectImpl.java:668)
>   at 
> org.apache.ignite.internal.binary.BinaryFieldImpl.fieldOrder(BinaryFieldImpl.java:284)
>   at 
> org.apache.ignite.internal.binary.BinaryFieldImpl.value(BinaryFieldImpl.java:106)
>   at 
> org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.fieldValue(QueryBinaryProperty.java:243)
>   at 
> org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:139)
>   at 
> org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateKeyAndValue(QueryTypeDescriptorImpl.java:512)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.rowToKeyValue(DmlStatementsProcessor.java:1031)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doInsert(DmlStatementsProcessor.java:877)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.processDmlSelectResult(DmlStatementsProcessor.java:438)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:420)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:194)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:229)
>   at 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1568)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1983)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1979)
>   at 
> org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2465)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1988)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1944)
>   at 
> org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest.checkAffinityKey(H2DynamicTableSelfTest.java:1375)

[jira] [Commented] (IGNITE-7293) "BinaryObjectException: Cannot find schema for object with compact footer" when "not null" field is defined

2017-12-28 Thread Pavel Tupitsyn (JIRA)

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

Pavel Tupitsyn commented on IGNITE-7293:


Schema ID calculation fixed in .NET (return {{0}} when there are no fields). 
Tests added.

> "BinaryObjectException: Cannot find schema for object with compact footer" 
> when "not null" field is defined
> ---
>
> Key: IGNITE-7293
> URL: https://issues.apache.org/jira/browse/IGNITE-7293
> Project: Ignite
>  Issue Type: Bug
>  Components: binary, sql
>Affects Versions: 2.3
>Reporter: Kirill Shirokov
>Assignee: Vladimir Ozerov
> Fix For: 2.4
>
>
> If the following test:
> org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest#testAffinityKey
> is modified by adding "not null" constraint to "age" column definition in 
> Person2 table:
> {noformat}
> execute("CREATE TABLE \"Person2\" (\"id\" int, \"city\" 
> varchar," +
> " \"name\" varchar, \"surname\" varchar, \"age\" int not 
> null, PRIMARY KEY (\"id\", \"city\")) WITH " +
> 
> "wrap_key,wrap_value,\"template=cache,affinity_key='city'\"");}}
> {noformat}
> The test fails with the following stack trace during INSERT operation:
> {noformat}
> class org.apache.ignite.binary.BinaryObjectException: Cannot find schema for 
> object with compact footer [typeId=-1199546406, schemaId=0]
>   at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.getOrCreateSchema(BinaryReaderExImpl.java:2020)
>   at 
> org.apache.ignite.internal.binary.BinaryObjectImpl.createSchema(BinaryObjectImpl.java:668)
>   at 
> org.apache.ignite.internal.binary.BinaryFieldImpl.fieldOrder(BinaryFieldImpl.java:284)
>   at 
> org.apache.ignite.internal.binary.BinaryFieldImpl.value(BinaryFieldImpl.java:106)
>   at 
> org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.fieldValue(QueryBinaryProperty.java:243)
>   at 
> org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:139)
>   at 
> org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateKeyAndValue(QueryTypeDescriptorImpl.java:512)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.rowToKeyValue(DmlStatementsProcessor.java:1031)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doInsert(DmlStatementsProcessor.java:877)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.processDmlSelectResult(DmlStatementsProcessor.java:438)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:420)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:194)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:229)
>   at 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1568)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1983)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1979)
>   at 
> org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2465)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1988)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1944)
>   at 
> org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest.checkAffinityKey(H2DynamicTableSelfTest.java:1375)
>   at 
> org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest.testAffinityKey(H2DynamicTableSelfTest.java:1318)
> {noformat}



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


[jira] [Commented] (IGNITE-7293) "BinaryObjectException: Cannot find schema for object with compact footer" when "not null" field is defined

2017-12-27 Thread Vladimir Ozerov (JIRA)

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

Vladimir Ozerov commented on IGNITE-7293:
-

Root cause: incorrect schema ID is used by builder when no fields are set.

> "BinaryObjectException: Cannot find schema for object with compact footer" 
> when "not null" field is defined
> ---
>
> Key: IGNITE-7293
> URL: https://issues.apache.org/jira/browse/IGNITE-7293
> Project: Ignite
>  Issue Type: Bug
>  Components: binary, sql
>Affects Versions: 2.3
>Reporter: Kirill Shirokov
>Assignee: Vladimir Ozerov
> Fix For: 2.4
>
>
> If the following test:
> org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest#testAffinityKey
> is modified by adding "not null" constraint to "age" column definition in 
> Person2 table:
> {noformat}
> execute("CREATE TABLE \"Person2\" (\"id\" int, \"city\" 
> varchar," +
> " \"name\" varchar, \"surname\" varchar, \"age\" int not 
> null, PRIMARY KEY (\"id\", \"city\")) WITH " +
> 
> "wrap_key,wrap_value,\"template=cache,affinity_key='city'\"");}}
> {noformat}
> The test fails with the following stack trace during INSERT operation:
> {noformat}
> class org.apache.ignite.binary.BinaryObjectException: Cannot find schema for 
> object with compact footer [typeId=-1199546406, schemaId=0]
>   at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.getOrCreateSchema(BinaryReaderExImpl.java:2020)
>   at 
> org.apache.ignite.internal.binary.BinaryObjectImpl.createSchema(BinaryObjectImpl.java:668)
>   at 
> org.apache.ignite.internal.binary.BinaryFieldImpl.fieldOrder(BinaryFieldImpl.java:284)
>   at 
> org.apache.ignite.internal.binary.BinaryFieldImpl.value(BinaryFieldImpl.java:106)
>   at 
> org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.fieldValue(QueryBinaryProperty.java:243)
>   at 
> org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:139)
>   at 
> org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateKeyAndValue(QueryTypeDescriptorImpl.java:512)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.rowToKeyValue(DmlStatementsProcessor.java:1031)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doInsert(DmlStatementsProcessor.java:877)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.processDmlSelectResult(DmlStatementsProcessor.java:438)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:420)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:194)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:229)
>   at 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1568)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1983)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1979)
>   at 
> org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2465)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1988)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1944)
>   at 
> org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest.checkAffinityKey(H2DynamicTableSelfTest.java:1375)
>   at 
> org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest.testAffinityKey(H2DynamicTableSelfTest.java:1318)
> {noformat}



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


[jira] [Commented] (IGNITE-7293) "BinaryObjectException: Cannot find schema for object with compact footer" when "not null" field is defined

2017-12-27 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on IGNITE-7293:


GitHub user devozerov opened a pull request:

https://github.com/apache/ignite/pull/3295

IGNITE-7293



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/gridgain/apache-ignite ignite-7293

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/ignite/pull/3295.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #3295


commit 877218e0e185cdaf955293c92b16f8c2e1f391ef
Author: devozerov 
Date:   2017-12-27T11:07:56Z

Fixed incorrect schema ID calculation when not fields are set.




> "BinaryObjectException: Cannot find schema for object with compact footer" 
> when "not null" field is defined
> ---
>
> Key: IGNITE-7293
> URL: https://issues.apache.org/jira/browse/IGNITE-7293
> Project: Ignite
>  Issue Type: Bug
>  Components: binary, sql
>Affects Versions: 2.3
>Reporter: Kirill Shirokov
>Assignee: Vladimir Ozerov
> Fix For: 2.4
>
>
> If the following test:
> org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest#testAffinityKey
> is modified by adding "not null" constraint to "age" column definition in 
> Person2 table:
> {noformat}
> execute("CREATE TABLE \"Person2\" (\"id\" int, \"city\" 
> varchar," +
> " \"name\" varchar, \"surname\" varchar, \"age\" int not 
> null, PRIMARY KEY (\"id\", \"city\")) WITH " +
> 
> "wrap_key,wrap_value,\"template=cache,affinity_key='city'\"");}}
> {noformat}
> The test fails with the following stack trace during INSERT operation:
> {noformat}
> class org.apache.ignite.binary.BinaryObjectException: Cannot find schema for 
> object with compact footer [typeId=-1199546406, schemaId=0]
>   at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.getOrCreateSchema(BinaryReaderExImpl.java:2020)
>   at 
> org.apache.ignite.internal.binary.BinaryObjectImpl.createSchema(BinaryObjectImpl.java:668)
>   at 
> org.apache.ignite.internal.binary.BinaryFieldImpl.fieldOrder(BinaryFieldImpl.java:284)
>   at 
> org.apache.ignite.internal.binary.BinaryFieldImpl.value(BinaryFieldImpl.java:106)
>   at 
> org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.fieldValue(QueryBinaryProperty.java:243)
>   at 
> org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:139)
>   at 
> org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateKeyAndValue(QueryTypeDescriptorImpl.java:512)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.rowToKeyValue(DmlStatementsProcessor.java:1031)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doInsert(DmlStatementsProcessor.java:877)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.processDmlSelectResult(DmlStatementsProcessor.java:438)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:420)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:194)
>   at 
> org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:229)
>   at 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1568)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1983)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1979)
>   at 
> org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2465)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1988)
>   at 
> org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1944)
>   at 
> org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest.checkAffinityKey(H2DynamicTableSelfTest.java:1375)
>   at 
>