You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexey Kukushkin (JIRA)" <ji...@apache.org> on 2018/08/06 12:47:00 UTC
[jira] [Created] (IGNITE-9197) Java thin client querying empty
table results in NoSuchElementException
Alexey Kukushkin created IGNITE-9197:
----------------------------------------
Summary: Java thin client querying empty table results in NoSuchElementException
Key: IGNITE-9197
URL: https://issues.apache.org/jira/browse/IGNITE-9197
Project: Ignite
Issue Type: Bug
Components: thin client
Affects Versions: 2.6
Environment: +*Reproducer*+
{code:java}
@Test
public void testGettingEmptyResultWhenQueryingEmptyTable() throws Exception {
try (Ignite ignored = Ignition.start(Config.getServerConfiguration());
IgniteClient client = Ignition.startClient(new ClientConfiguration().setAddresses(Config.SERVER))
) {
final String TBL = "Person";
client.query(
new SqlFieldsQuery("CREATE TABLE IF NOT EXISTS " + TBL + " (id INT PRIMARY KEY, name VARCHAR)")
).getAll();
List<List<?>> res = client.query(new SqlFieldsQuery("SELECT * FROM " + TBL)).getAll();
assertNotNull(res);
assertEquals(0, res.size());
}
}
{code}
*Expected*
The test above should pass
*Actual*
java.util.NoSuchElementException
at java.util.ArrayList$Itr.next(ArrayList.java:862)
at org.apache.ignite.internal.client.thin.ClientQueryCursor$1.next(ClientQueryCursor.java:87)
at org.apache.ignite.internal.client.thin.ClientQueryCursor.getAll(ClientQueryCursor.java:45)
at org.apache.ignite.client.FunctionalQueryTest.testGettingEmptyResultWhenQueryingEmptyTable(FunctionalQueryTest.java:171)
Reporter: Alexey Kukushkin
Assignee: Alexey Kukushkin
Fix For: 2.7
+*Reproducer*+
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)