ygerzhedovich commented on code in PR #832:
URL: https://github.com/apache/ignite-3/pull/832#discussion_r888846953
##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/api/ItSqlAsynchronousApiTest.java:
##########
@@ -192,6 +197,40 @@ public void select() throws ExecutionException,
InterruptedException {
checkSession(ses);
}
+ @Test
+ public void metadata() throws ExecutionException, InterruptedException {
+ sql("CREATE TABLE TEST(COL0 BIGINT PRIMARY KEY, COL1 VARCHAR NOT
NULL)");
+ sql("INSERT INTO TEST VALUES (?, ?)", 1L, "some string");
+
+ IgniteSql sql = CLUSTER_NODES.get(0).sql();
+ Session ses = sql.sessionBuilder().build();
+
+ AsyncResultSet rs = ses.executeAsync(null, "SELECT COL1, COL0 FROM
TEST").get();
+
+ // Validata columns metadata.
+ ResultSetMetadata meta = rs.metadata();
+
+ assertNotNull(meta);
+ assertEquals(-1, meta.indexOf("COL"));
+ assertEquals(0, meta.indexOf("COL1"));
+ assertEquals(1, meta.indexOf("COL0"));
+
+ //TODO: Fix nullability issue
Review Comment:
What does it mean?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]