You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by am...@apache.org on 2021/11/22 15:38:23 UTC

[ignite-3] branch ignite-15212 updated (7341f2f -> 7e52858)

This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a change to branch ignite-15212
in repository https://gitbox.apache.org/repos/asf/ignite-3.git.


    omit 7341f2f  WIP. Minor after review.
     new 7e52858  WIP. Minor after review.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (7341f2f)
            \
             N -- N -- N   refs/heads/ignite-15212 (7e52858)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 modules/sql/src/test/java/IgniteSqlTest.java | 27 ++-------------------------
 1 file changed, 2 insertions(+), 25 deletions(-)

[ignite-3] 01/01: WIP. Minor after review.

Posted by am...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

amashenkov pushed a commit to branch ignite-15212
in repository https://gitbox.apache.org/repos/asf/ignite-3.git

commit 7e52858f159de37f1ba4d0c7e532ad65cb2143a8
Author: Andrew Mashenkov <an...@gmail.com>
AuthorDate: Mon Nov 22 18:24:57 2021 +0300

    WIP. Minor after review.
---
 .../java/org/apache/ignite/sql/MultiResultSet.java | 27 ---------------------
 .../main/java/org/apache/ignite/sql/Session.java   |  3 +--
 modules/sql/src/test/java/IgniteSqlTest.java       | 28 ++--------------------
 3 files changed, 3 insertions(+), 55 deletions(-)

diff --git a/modules/api/src/main/java/org/apache/ignite/sql/MultiResultSet.java b/modules/api/src/main/java/org/apache/ignite/sql/MultiResultSet.java
deleted file mode 100644
index 6656f9b..0000000
--- a/modules/api/src/main/java/org/apache/ignite/sql/MultiResultSet.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.sql;
-
-/**
- * Result set for multi-statement query.
- */
-public interface MultiResultSet extends Iterable<ResultSet>, AutoCloseable {
-    /** {@inheritDoc} */
-    @Override
-    void close();
-}
diff --git a/modules/api/src/main/java/org/apache/ignite/sql/Session.java b/modules/api/src/main/java/org/apache/ignite/sql/Session.java
index 76549af..5f5decf 100644
--- a/modules/api/src/main/java/org/apache/ignite/sql/Session.java
+++ b/modules/api/src/main/java/org/apache/ignite/sql/Session.java
@@ -83,10 +83,9 @@ public interface Session extends AsyncSession, ReactiveSession {
      *
      * @param query     SQL query template.
      * @param arguments Arguments for the template (optional).
-     * @return SQL query results set.
      * @throws SqlException If failed.
      */
-    MultiResultSet executeScript(@NotNull String query, Object... arguments);
+    void executeScript(@NotNull String query, Object... arguments);
 
     /**
      * Sets session property.
diff --git a/modules/sql/src/test/java/IgniteSqlTest.java b/modules/sql/src/test/java/IgniteSqlTest.java
index 1646b93..fe87d4a 100644
--- a/modules/sql/src/test/java/IgniteSqlTest.java
+++ b/modules/sql/src/test/java/IgniteSqlTest.java
@@ -35,7 +35,6 @@ import org.apache.ignite.internal.schema.SchemaRegistry;
 import org.apache.ignite.internal.util.Constants;
 import org.apache.ignite.schema.definition.ColumnType;
 import org.apache.ignite.sql.IgniteSql;
-import org.apache.ignite.sql.MultiResultSet;
 import org.apache.ignite.sql.ResultSet;
 import org.apache.ignite.sql.ResultSetMetadata;
 import org.apache.ignite.sql.Session;
@@ -130,18 +129,11 @@ public class IgniteSqlTest {
     public void testSyncMultiStatementSql() {
         Session sess = queryMgr.newSession();
 
-        MultiResultSet multiRs = sess.executeScript(
+        sess.executeScript(
                 "CREATE TABLE tbl(id INTEGER PRIMARY KEY, val VARCHAR);"
                         + "INSERT INTO tbl VALUES (1, 2);"
-                        + "SELECT id, val FROM tbl WHERE id == {};"
+                        + "INSERT INTO tbl2 (SELECT id, val FROM tbl WHERE id == {});"
                         + "DROP TABLE tbl", 10);
-
-        Iterator<ResultSet> iterator = multiRs.iterator();
-        //TODO: Closable iterator.
-
-        ResultSet rs = iterator.next();
-
-        String str = rs.iterator().next().stringValue("val");
     }
 
     @Disabled
@@ -323,21 +315,6 @@ public class IgniteSqlTest {
                     return CompletableFuture.completedFuture(page1);
                 });
 
-        Mockito.when(session.executeScript(Mockito.any(), Mockito.any()))
-                .thenAnswer(
-                        ans0 -> Mockito.when(Mockito.mock(MultiResultSet.class).iterator())
-                                .thenAnswer(
-                                        ans1 -> Mockito.when(Mockito.mock(Iterator.class).next())
-                                                .thenAnswer(
-                                                        ans2 -> Mockito
-                                                                .when(Mockito.mock(ResultSet.class)
-                                                                        .iterator())
-                                                                .thenReturn(query1Resuls.iterator())
-                                                                .getMock()
-                                                ).getMock()
-                                ).getMock()
-                );
-
         Mockito.when(session.executeReactive(
                 Mockito.startsWith("SELECT id, val FROM tbl WHERE id < {} AND val LIKE {};"),
                 Mockito.nullable(Transaction.class), Mockito.any(), Mockito.any()))
@@ -371,7 +348,6 @@ public class IgniteSqlTest {
     }
 
 
-
     static class SqlRowSubscriber extends CompletableFuture<Void> implements
             Flow.Subscriber<SqlRow> {
         private Consumer<SqlRow> rowConsumer;