ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Kukushkin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-9197) Java thin client querying empty table results in NoSuchElementException
Date Mon, 06 Aug 2018 12:48:00 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-9197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Kukushkin updated IGNITE-9197:
-------------------------------------
    Environment:     (was: +*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))

> 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
>            Reporter: Alexey Kukushkin
>            Assignee: Alexey Kukushkin
>            Priority: Critical
>             Fix For: 2.7
>
>
> +*Reproducer*+
>  



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

Mime
View raw message