[jira] [Created] (IGNITE-7724) SQL COPY: network performance improvements

2018-02-15 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7724:
---

 Summary: SQL COPY: network performance improvements
 Key: IGNITE-7724
 URL: https://issues.apache.org/jira/browse/IGNITE-7724
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.3, 2.4, 2.5
Reporter: Kirill Shirokov
Assignee: Kirill Shirokov






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


[jira] [Created] (IGNITE-7709) SQL COPY: fix file name handling

2018-02-14 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7709:
---

 Summary: SQL COPY: fix file name handling
 Key: IGNITE-7709
 URL: https://issues.apache.org/jira/browse/IGNITE-7709
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.3, 2.4, 2.5
Reporter: Kirill Shirokov
Assignee: Kirill Shirokov


Currently file name is parsed as identifier, which is obviously a bug.



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


[jira] [Created] (IGNITE-7681) SQL COPY: measure and fix performance if needed

2018-02-12 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7681:
---

 Summary: SQL COPY: measure and fix performance if needed
 Key: IGNITE-7681
 URL: https://issues.apache.org/jira/browse/IGNITE-7681
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.4, 2.5
Reporter: Kirill Shirokov
Assignee: Kirill Shirokov






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


[jira] [Created] (IGNITE-7661) SQL COPY: provide more tests for national Unicode characters (including surrogates and 0x10000+ range)

2018-02-09 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7661:
---

 Summary: SQL COPY: provide more tests for national Unicode 
characters (including surrogates and 0x1+ range)
 Key: IGNITE-7661
 URL: https://issues.apache.org/jira/browse/IGNITE-7661
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.5
Reporter: Kirill Shirokov






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


[jira] [Created] (IGNITE-7657) SQL COPY: minor style fixes

2018-02-08 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7657:
---

 Summary: SQL COPY: minor style fixes
 Key: IGNITE-7657
 URL: https://issues.apache.org/jira/browse/IGNITE-7657
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov
Assignee: Kirill Shirokov






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


[jira] [Created] (IGNITE-7605) SQL COPY: add more SQL parser tests for positive scenarios

2018-02-01 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7605:
---

 Summary: SQL COPY: add more SQL parser tests for positive scenarios
 Key: IGNITE-7605
 URL: https://issues.apache.org/jira/browse/IGNITE-7605
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov






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


[jira] [Created] (IGNITE-7602) SQL COPY: add tests for file reading failures

2018-02-01 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7602:
---

 Summary: SQL COPY: add tests for file reading failures
 Key: IGNITE-7602
 URL: https://issues.apache.org/jira/browse/IGNITE-7602
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov






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


[jira] [Created] (IGNITE-7601) SQL COPY: add tests for implicit columns (_key, _val, _ver)

2018-02-01 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7601:
---

 Summary: SQL COPY: add tests for implicit columns (_key, _val, 
_ver)
 Key: IGNITE-7601
 URL: https://issues.apache.org/jira/browse/IGNITE-7601
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov






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


[jira] [Created] (IGNITE-7587) SQL COPY: document the command

2018-01-31 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7587:
---

 Summary: SQL COPY: document the command
 Key: IGNITE-7587
 URL: https://issues.apache.org/jira/browse/IGNITE-7587
 Project: Ignite
  Issue Type: Improvement
  Components: documentation, sql
Affects Versions: 2.4
Reporter: Kirill Shirokov


SQL COPY command needs to be documented at readme.io.



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


[jira] [Created] (IGNITE-7586) SQL COPY: add code examples

2018-01-31 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7586:
---

 Summary: SQL COPY: add code examples
 Key: IGNITE-7586
 URL: https://issues.apache.org/jira/browse/IGNITE-7586
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov






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


[jira] [Created] (IGNITE-7554) SQL COPY: consider providing support for the command in batch mode

2018-01-26 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7554:
---

 Summary: SQL COPY: consider providing support for the command in 
batch mode
 Key: IGNITE-7554
 URL: https://issues.apache.org/jira/browse/IGNITE-7554
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov


Currently SQL COPY command rejects to execute in JDBC batch mode (via 
java.sql.Statement.addBatch() + executeBatch()).

If we want COPY to be executed in batch mode we need to implement it.



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


[jira] [Created] (IGNITE-7553) SQL COPY: provide support for the command in jdbc2 driver

2018-01-26 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7553:
---

 Summary: SQL COPY: provide support for the command in jdbc2 driver
 Key: IGNITE-7553
 URL: https://issues.apache.org/jira/browse/IGNITE-7553
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov


Currently COPY command is supported only in thin JDBC driver. It needs to be 
supported in other JDBC driver implementations as well.



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


[jira] [Created] (IGNITE-7549) SQL COPY: implement file transfer compression

2018-01-26 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7549:
---

 Summary: SQL COPY: implement file transfer compression
 Key: IGNITE-7549
 URL: https://issues.apache.org/jira/browse/IGNITE-7549
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov


We can gain huge improvement in text file transfer times from client to server 
by using compression. User should have a possibility to enable or disable 
compression using a parameter of COPY command:

{noformat}
COPY
 ...
 [COMPRESS 'codec-name' [codec options]]
{noformat}



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


[jira] [Created] (IGNITE-7548) SQL COPY: handle CSV lines with less values than required correctly

2018-01-26 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7548:
---

 Summary: SQL COPY: handle CSV lines with less values than required 
correctly
 Key: IGNITE-7548
 URL: https://issues.apache.org/jira/browse/IGNITE-7548
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov


Currently some of lines in CSV files can have less values than declared in the 
command or CSV header.

We need to think how do we handle such rows:
* append empty values ("") for the missing trailing columns
* append null values
* reject such lines and report an error

We might need a COPY command parameter to configure the desired behaviour.



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


[jira] [Created] (IGNITE-7546) SQL COPY co

2018-01-26 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7546:
---

 Summary: SQL COPY co
 Key: IGNITE-7546
 URL: https://issues.apache.org/jira/browse/IGNITE-7546
 Project: Ignite
  Issue Type: Improvement
Reporter: Kirill Shirokov






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


[jira] [Created] (IGNITE-7545) SQL COPY command: implement duplicate handling strategy

2018-01-26 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7545:
---

 Summary: SQL COPY command: implement duplicate handling strategy
 Key: IGNITE-7545
 URL: https://issues.apache.org/jira/browse/IGNITE-7545
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov


The SQL COPY command should have user-configurable policy of handling duplicate 
records:

{noformat}
COPY
...
 [(REPLACE | IGNORE| ABORT ON [])) DUPLICATE KEYS]
{noformat}

This handling might be not available for some backends (e.g., streamer).



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


[jira] [Created] (IGNITE-7544) SQL COPY command: implement statistics gathering and error reporting

2018-01-26 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7544:
---

 Summary: SQL COPY command: implement statistics gathering and 
error reporting
 Key: IGNITE-7544
 URL: https://issues.apache.org/jira/browse/IGNITE-7544
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov


In the COPY command we might be interested in how many rows:
* have been added
* have been updated
* have been skipped
* had errors

The numbers above can be reported as a row with corresponding columns. Errors 
can be reported as a cursor with appropriate rows.



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


[jira] [Created] (IGNITE-7542) SQL COPY command: implement multipliers (e.g., 'K' for kilo-, 'M' for mega-) in numbers

2018-01-25 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7542:
---

 Summary: SQL COPY command: implement multipliers (e.g., 'K' for 
kilo-, 'M' for mega-) in numbers
 Key: IGNITE-7542
 URL: https://issues.apache.org/jira/browse/IGNITE-7542
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Kirill Shirokov


Multipliers can be important for several options, such as batch size.

The syntax could be:

{noformat}
COPY
...
BATCH_SIZE 1.5M
{noformat}

Such number can have a decimal point and an optional multiplier:

K: 1024
M: 1024 * 1024
...and so on for tera- and peta-



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


[jira] [Created] (IGNITE-7541) SQL COPY command: implement backend switching option

2018-01-25 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7541:
---

 Summary: SQL COPY command: implement backend switching option
 Key: IGNITE-7541
 URL: https://issues.apache.org/jira/browse/IGNITE-7541
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Kirill Shirokov


When we load data using COPY command we can add key/value pairs to the cache 
using different ways:

* Directly calling cache.putAll()
* Loading data via DataStreamer
* etc.

Every backend has its pros and cons. For example, the streamer is fast and 
asynchronous, although it cannot replace value and cannot provide any 
statistics -- such as number of added records. The direct interface is slow and 
synchronous, but provides us with an ability to either replace or skip the 
records with the same key and respond to the user with full statistics.

There shall be an option in the SQL command to switch to particular backend. 
For example:

{noformat}
COPY
FROM 'file'
...
[BACKEND (DIRECT | STREAMER)]

We might have more backends in the future.
{noformat}




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


[jira] [Created] (IGNITE-7539) SQL COPY command: implement NULL escape sequence handling

2018-01-25 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7539:
---

 Summary: SQL COPY command: implement NULL escape sequence handling
 Key: IGNITE-7539
 URL: https://issues.apache.org/jira/browse/IGNITE-7539
 Project: Ignite
  Issue Type: Improvement
Reporter: Kirill Shirokov


There should be a way to specify NULL field value in a file, which we import 
via COPY command.

A popular solution among vendors for CSV format is to have a special escape 
sequence for a NULL value in a field: \N for example.

We need to have a possibility to enable/disable null escape sequence handling 
for all fields or on per-field basis.



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


[jira] [Created] (IGNITE-7537) SQL COPY command: implement CSV format options

2018-01-25 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7537:
---

 Summary: SQL COPY command: implement CSV format options
 Key: IGNITE-7537
 URL: https://issues.apache.org/jira/browse/IGNITE-7537
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Kirill Shirokov


The following options can be implemented for the CSV format:

* Line separator pattern
* Field separator pattern
* Quoting characters

Escape sequences support are important for this feature. There is a code for 
handling escape sequences in branch ignite-7372 (see IGNITE-7372 for details).




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


[jira] [Created] (IGNITE-7535) SQL COPY command: implement encoding option

2018-01-25 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7535:
---

 Summary: SQL COPY command: implement encoding option
 Key: IGNITE-7535
 URL: https://issues.apache.org/jira/browse/IGNITE-7535
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Reporter: Kirill Shirokov


The syntax can be something like:

{noformat}
COPY 
FROM 'file' [CHARSET ]
INTO ...
{noformat}

CHARSET is optional. By default the encoding is UTF-8.



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


[jira] [Created] (IGNITE-7400) OptimizedMarshallerIndexNameTest doesn't kill the grid after the test

2018-01-12 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7400:
---

 Summary: OptimizedMarshallerIndexNameTest doesn't kill the grid 
after the test
 Key: IGNITE-7400
 URL: https://issues.apache.org/jira/browse/IGNITE-7400
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov
Assignee: Kirill Shirokov






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


[jira] [Created] (IGNITE-7374) Add 'default' as a possible value for an SQL command parameter

2018-01-10 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7374:
---

 Summary: Add 'default' as a possible value for an SQL command 
parameter
 Key: IGNITE-7374
 URL: https://issues.apache.org/jira/browse/IGNITE-7374
 Project: Ignite
  Issue Type: Improvement
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov






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


[jira] [Created] (IGNITE-7373) Fix style guide violations and imprecise naming in SqlParser-related code

2018-01-10 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7373:
---

 Summary: Fix style guide violations and imprecise naming in 
SqlParser-related code
 Key: IGNITE-7373
 URL: https://issues.apache.org/jira/browse/IGNITE-7373
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov
Priority: Minor


SQL parser implementation contains many abbreviation rule violations (for 
instance, token instead of tok) and imprecise names (e.g.: 
SqlParserUtils.skipIfMatches throws an exception if the token doesn't match, 
although the name doesn't reflect this. 'accept' or 'skip' without 'if' would 
be more precise)



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


[jira] [Created] (IGNITE-7372) Implement escape sequences handling in internal SQL parser

2018-01-10 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7372:
---

 Summary: Implement escape sequences handling in internal SQL parser
 Key: IGNITE-7372
 URL: https://issues.apache.org/jira/browse/IGNITE-7372
 Project: Ignite
  Issue Type: New Feature
  Components: sql
Reporter: Kirill Shirokov
Priority: Minor


Implement escape sequences handling inside quoted literals. 

The initial implementation is pruned from IGNITE-6861 and put into this feature 
branch.



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


[jira] [Created] (IGNITE-7370) Drop test tables in each test case in H2DynamicTableSelfTest

2018-01-10 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7370:
---

 Summary: Drop test tables in each test case in 
H2DynamicTableSelfTest
 Key: IGNITE-7370
 URL: https://issues.apache.org/jira/browse/IGNITE-7370
 Project: Ignite
  Issue Type: Task
Reporter: Kirill Shirokov
Priority: Minor


Failing test cases are leaving tables they've created which in turn causes 
subsequent test cases to report false failures, e.g. when latter test tries to 
create a table with the same name.

It would be great for such tables tables to run down curtain and join the choir 
invisible in finally clause; an example:

{noformat}
public void testInternalCreateExistingTable() throws Exception {
+   try {
execute("CREATE TABLE \"Person\" (\"id\" int, \"city\" 
varchar," +
" \"name\" varchar, \"surname\" varchar, \"age\" int, 
PRIMARY KEY (\"id\", \"city\")) " +
"template=\"cache\"");

GridTestUtils.assertThrows(null, new Callable() {
@Override public Object call() throws Exception {
execute("CREATE TABLE \"Person\" (\"id\" int, 
\"city\" varchar" +
", \"name\" varchar, \"surname\" varchar, 
\"age\" int, PRIMARY KEY (\"id\", \"city\")) " +
"template=\"cache\"");

return null;
}
}, IgniteSQLException.class, "Table already exists: 
Person");
+   }
+   finally {
+   execute("DROP TABLE \"Person\"");
+   }
...
{noformat}



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


[jira] [Created] (IGNITE-7299) Document internal CREATE TABLE SQL command

2017-12-25 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7299:
---

 Summary: Document internal CREATE TABLE SQL command
 Key: IGNITE-7299
 URL: https://issues.apache.org/jira/browse/IGNITE-7299
 Project: Ignite
  Issue Type: Task
  Components: documentation
Affects Versions: 2.3
Reporter: Kirill Shirokov
Assignee: Kirill Shirokov
Priority: Minor






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


[jira] [Created] (IGNITE-7293) "BinaryObjectException: Cannot find schema for object with compact footer" thrown if not null field defined

2017-12-23 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7293:
---

 Summary: "BinaryObjectException: Cannot find schema for object 
with compact footer" thrown if not null field defined
 Key: IGNITE-7293
 URL: https://issues.apache.org/jira/browse/IGNITE-7293
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.3
Reporter: Kirill Shirokov


If the following test:

org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest#testAffinityKey

is modified to include not null key column in Person2 table:

{{execute("CREATE TABLE \"Person2\" (\"id\" int, \"city\" 
varchar," +
" \"name\" varchar, \"surname\" varchar, \"age\" int 
{color:red}not null{color}, PRIMARY KEY (\"id\", \"city\")) WITH " +

"wrap_key,wrap_value,\"template=cache,affinity_key='city'\"");}}

The test fails with the following stack trace:

{{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)
}}




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


[jira] [Created] (IGNITE-7122) Page lock status is not checked in BPlusTree.treePrinter methods

2017-12-06 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7122:
---

 Summary: Page lock status is not checked in BPlusTree.treePrinter 
methods
 Key: IGNITE-7122
 URL: https://issues.apache.org/jira/browse/IGNITE-7122
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.4
Reporter: Kirill Shirokov
Assignee: Kirill Shirokov


The result of readLock(), which can be 0 is not checked in 
BPlusTree.treePrinter getChildren() and formatTreeNode() calls:

java.lang.AssertionError: 0
at org.apache.ignite.internal.pagemem.PageUtils.getLong(PageUtils.java:117)
at 
org.apache.ignite.internal.processors.cache.persistence.tree.io.PageIO.getPageId(PageIO.java:279)
at 
org.apache.ignite.internal.processors.database.BPlusTreeSelfTest.checkPageId(BPlusTreeSelfTest.java:2307)
at 
org.apache.ignite.internal.processors.database.BPlusTreeSelfTest$TestTree.onReadUnlock(BPlusTreeSelfTest.java:2445)
at 
org.apache.ignite.internal.processors.cache.persistence.tree.util.PageHandler.readUnlock(PageHandler.java:203)
at 
org.apache.ignite.internal.processors.cache.persistence.DataStructure.readUnlock(DataStructure.java:186)
at 
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.access$400(BPlusTree.java:82)
at 
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$1.getChildren(BPlusTree.java:163)
at 
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$1.getChildren(BPlusTree.java:120)
at 
org.apache.ignite.internal.util.lang.GridTreePrinter.printTree(GridTreePrinter.java:60)
at 
org.apache.ignite.internal.util.lang.GridTreePrinter.printTree(GridTreePrinter.java:67)
at 
org.apache.ignite.internal.util.lang.GridTreePrinter.print(GridTreePrinter.java:32)
at 
org.apache.ignite.internal.util.lang.GridTreePrinter.print(GridTreePrinter.java:43)
at 
org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.printTree(BPlusTree.java:1188)
at 
org.apache.ignite.internal.processors.database.BPlusTreeSelfTest$19.call(BPlusTreeSelfTest.java:1777)
at 
org.apache.ignite.internal.processors.database.BPlusTreeSelfTest$19.call(BPlusTreeSelfTest.java:1771)
at 
org.apache.ignite.testframework.GridTestThread.run(GridTestThread.java:86)



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


[jira] [Created] (IGNITE-7068) Incorrect error reporting for incompatible type in SQL WHERE clause

2017-11-29 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7068:
---

 Summary: Incorrect error reporting for incompatible type in SQL 
WHERE clause
 Key: IGNITE-7068
 URL: https://issues.apache.org/jira/browse/IGNITE-7068
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.3
Reporter: Kirill Shirokov


When we create a cache with some POJO key type, say AffinityKey => String and 
try to search in it using a statement tries to compare the key with an integer 
argument (e.g., "select name from Person where _key = 25"), we get a misleading 
exception:

{noformat}
javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException: 
Deserialization failed, cause: "class org.apache.ignite.IgniteCheckedException: 
Not enough data to read the value [position=1, requiredBytes=4, 
remainingBytes=0]" [90027-195]
at 
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:1927)
at 
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:585)
at 
org.apache.ignite.internal.processors.cache.IgniteCacheProxyImpl.query(IgniteCacheProxyImpl.java:560)
at 
org.apache.ignite.internal.processors.cache.GatewayProtectedCacheProxy.query(GatewayProtectedCacheProxy.java:382)
at 
org.apache.ignite.internal.processors.cache.IgniteCacheAbstractFieldsQuerySelfTest.testIncompatibleTypesInWhereClause(IgniteCacheAbstractFieldsQuerySelfTest.java:688)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at junit.framework.TestCase.runTest(TestCase.java:176)
at 
org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2000)
at 
org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:132)
at 
org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1915)
at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteCheckedException: Deserialization 
failed, cause: "class org.apache.ignite.IgniteCheckedException: Not enough data 
to read the value [position=1, requiredBytes=4, remainingBytes=0]" [90027-195]
at 
org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2489)
at 
org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFields(GridQueryProcessor.java:1924)
... 13 more
Caused by: org.h2.message.DbException: Deserialization failed, cause: "class 
org.apache.ignite.IgniteCheckedException: Not enough data to read the value 
[position=1, requiredBytes=4, remainingBytes=0]" [90027-195]
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.util.JdbcUtils.deserialize(JdbcUtils.java:422)
at 
org.h2.value.ValueJavaObject$NotSerialized.getObject(ValueJavaObject.java:166)
at 
org.h2.value.ValueJavaObject$NotSerialized.getString(ValueJavaObject.java:143)
at 
org.h2.value.ValueJavaObject$NotSerialized.getDisplaySize(ValueJavaObject.java:174)
at 
org.h2.expression.ValueExpression.getDisplaySize(ValueExpression.java:134)
at 
org.apache.ignite.internal.processors.query.h2.sql.GridSqlType.fromExpression(GridSqlType.java:106)
at 
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parseExpression(GridSqlQueryParser.java:1581)
at 
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parseExpression0(GridSqlQueryParser.java:1683)
at 
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parseExpression(GridSqlQueryParser.java:1578)
at 
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parseSelect(GridSqlQueryParser.java:635)
at 
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parseQuery(GridSqlQueryParser.java:1531)
at 
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQueryParser.parse(GridSqlQueryParser.java:1489)
at 
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.parse(GridSqlQuerySplitter.java:1635)
at 
org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySplitter.split(GridSqlQuerySplitter.java:199)
at 
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1525)
at 
org.apache.ignite.internal.processors.query.GridQueryProcessor$5.applyx(GridQueryProcessor.java:1919)
at 

[jira] [Created] (IGNITE-7046) Client queries should throw a correct exception

2017-11-28 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7046:
---

 Summary: Client queries should throw a correct exception
 Key: IGNITE-7046
 URL: https://issues.apache.org/jira/browse/IGNITE-7046
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.3
Reporter: Kirill Shirokov


The following test being added to 
org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheReplicatedQuerySelfTest:

/**
 * Method verifies that in the case of client query index is not used and a 
correct exception is thrown.
 *
 * @throws Exception If failed.
 */
public void testClientOnlyNodeIndexException() throws Exception {
try {
Ignite g = startGrid("client");

IgniteCache c = jcache(g, Integer.class, 
Integer.class);

try {
List cres = c.query(new SqlFieldsQuery("select 
count(*) from Integer")
.setLocal(true)).getAll();
} 
catch (IgniteException e) {
throw e; // FIXME: put an exception-checking code here instead 
of throw
}
}
finally {
stopGrid("client");
}
}

...will result in NPE instead of an Ignite exception explaining the appropriate 
cause.



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


[jira] [Created] (IGNITE-7045) Client queries should throw a correct exception

2017-11-28 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-7045:
---

 Summary: Client queries should throw a correct exception
 Key: IGNITE-7045
 URL: https://issues.apache.org/jira/browse/IGNITE-7045
 Project: Ignite
  Issue Type: Bug
  Components: sql
Affects Versions: 2.3
Reporter: Kirill Shirokov


The following test being added to 
org.apache.ignite.internal.processors.cache.distributed.replicated.IgniteCacheReplicatedQuerySelfTest:

/**
 * Method verifies that in the case of client query index is not used and a 
correct exception is thrown.
 *
 * @throws Exception If failed.
 */
public void testClientOnlyNodeIndexException() throws Exception {
try {
Ignite g = startGrid("client");

IgniteCache c = jcache(g, Integer.class, 
Integer.class);

try {
List cres = c.query(new SqlFieldsQuery("select 
count(*) from Integer")
.setLocal(true)).getAll();
} 
catch (IgniteException e) {
throw e; // FIXME: put an exception-checking code here instead 
of throw
}
}
finally {
stopGrid("client");
}
}

...will result in NPE instead of an Ignite exception explaining the appropriate 
cause.



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


[jira] [Created] (IGNITE-6948) SQL: Document new INLINE_SIZE option in CREATE INDEX command

2017-11-17 Thread Kirill Shirokov (JIRA)
Kirill Shirokov created IGNITE-6948:
---

 Summary: SQL: Document new INLINE_SIZE option in CREATE INDEX 
command
 Key: IGNITE-6948
 URL: https://issues.apache.org/jira/browse/IGNITE-6948
 Project: Ignite
  Issue Type: Task
  Security Level: Public (Viewable by anyone)
  Components: documentation
Reporter: Kirill Shirokov
 Fix For: 2.4


INLINE_SIZE is optional and accepts positive integer values. To specify the 
default inline size user should omit the option.



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