You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/06/08 11:22:25 UTC

[GitHub] [ignite-3] tledkov-gridgain commented on a diff in pull request #865: IGNITE-17057 Implement synchronous SQL API for java client

tledkov-gridgain commented on code in PR #865:
URL: https://github.com/apache/ignite-3/pull/865#discussion_r892237629


##########
modules/client/src/main/java/org/apache/ignite/internal/client/sql/ClientSession.java:
##########
@@ -82,15 +83,17 @@ public ClientSession(
     /** {@inheritDoc} */
     @Override
     public ResultSet execute(@Nullable Transaction transaction, String query, @Nullable Object... arguments) {
-        // TODO IGNITE-17057.
-        throw new UnsupportedOperationException("Not implemented yet.");
+        Objects.requireNonNull(query);
+
+        return new ResultSetImpl(sync(executeAsync(transaction, query, arguments)));

Review Comment:
   Different methods are used to await CompletableFuture at three places: 
   - sync (here)
   - await (embedded SessionImpl)
   - join (ResultSetImpl)
   
   What do you think about unification?



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org