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

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


The following commit(s) were added to refs/heads/ignite-14972 by this push:
     new b4311e950 Skip metadata propagation (IGNITE-17052)
b4311e950 is described below

commit b4311e950ce642d3447273a30e04f2cd41a83428
Author: Pavel Tupitsyn <[email protected]>
AuthorDate: Mon May 30 16:26:57 2022 +0300

    Skip metadata propagation (IGNITE-17052)
---
 .../requests/sql/ClientSqlColumnMetadata.java      | 76 ----------------------
 .../requests/sql/ClientSqlExecuteRequest.java      |  7 +-
 .../internal/client/sql/ClientAsyncResultSet.java  | 75 +++++++++++++++++++++
 3 files changed, 80 insertions(+), 78 deletions(-)

diff --git 
a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlColumnMetadata.java
 
b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlColumnMetadata.java
deleted file mode 100644
index f70ec849b..000000000
--- 
a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlColumnMetadata.java
+++ /dev/null
@@ -1,76 +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.client.handler.requests.sql;
-
-import org.apache.ignite.sql.ColumnMetadata;
-
-/**
- * Client SQL column metadata.
- */
-class ClientSqlColumnMetadata implements ColumnMetadata {
-    /** */
-    private final String name;
-
-    /** */
-    private final Class<?> valueClass;
-
-    /** */
-    private final Object type;
-
-    /** */
-    private final boolean nullable;
-
-    /**
-     * Constructor.
-     *
-     * @param name       Column name.
-     * @param valueClass Value class.
-     * @param type       Column type.
-     * @param nullable   Nullable.
-     */
-    public ClientSqlColumnMetadata(String name, Class<?> valueClass, Object 
type, boolean nullable) {
-        this.name = name;
-        this.valueClass = valueClass;
-        this.type = type;
-        this.nullable = nullable;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public String name() {
-        return name;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public Class<?> valueClass() {
-        return valueClass;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public Object type() {
-        return type;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public boolean nullable() {
-        return nullable;
-    }
-}
diff --git 
a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlExecuteRequest.java
 
b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlExecuteRequest.java
index fde6a67b0..4c724171c 100644
--- 
a/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlExecuteRequest.java
+++ 
b/modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/sql/ClientSqlExecuteRequest.java
@@ -104,7 +104,10 @@ public class ClientSqlExecuteRequest {
             out.packBoolean(asyncResultSet.wasApplied());
 
             // Pack metadata.
-            if (asyncResultSet.metadata() == null || 
asyncResultSet.metadata().columns() == null) {
+            // TODO: IGNITE-17052
+            out.packArrayHeader(0);
+
+            /** if (asyncResultSet.metadata() == null || 
asyncResultSet.metadata().columns() == null) {
                 out.packArrayHeader(0);
             } else {
                 List<ColumnMetadata> cols = 
asyncResultSet.metadata().columns();
@@ -120,7 +123,7 @@ public class ClientSqlExecuteRequest {
                     out.packString(col.valueClass().getName());
                     out.packObjectWithType(col.type());
                 }
-            }
+            }*/
 
             // Pack first page.
             if (asyncResultSet.hasRowSet()) {
diff --git 
a/modules/client/src/main/java/org/apache/ignite/internal/client/sql/ClientAsyncResultSet.java
 
b/modules/client/src/main/java/org/apache/ignite/internal/client/sql/ClientAsyncResultSet.java
new file mode 100644
index 000000000..1c706637c
--- /dev/null
+++ 
b/modules/client/src/main/java/org/apache/ignite/internal/client/sql/ClientAsyncResultSet.java
@@ -0,0 +1,75 @@
+/*
+ * 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.internal.client.sql;
+
+import java.util.concurrent.CompletionStage;
+import org.apache.ignite.sql.ResultSetMetadata;
+import org.apache.ignite.sql.SqlRow;
+import org.apache.ignite.sql.async.AsyncResultSet;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * Client async result set.
+ */
+class ClientAsyncResultSet implements AsyncResultSet {
+    @Override
+    public @Nullable ResultSetMetadata metadata() {
+        // TODO: IGNITE-17052
+        throw new UnsupportedOperationException("Not implemented yet.");
+    }
+
+    @Override
+    public boolean hasRowSet() {
+        return false;
+    }
+
+    @Override
+    public long affectedRows() {
+        return 0;
+    }
+
+    @Override
+    public boolean wasApplied() {
+        return false;
+    }
+
+    @Override
+    public Iterable<SqlRow> currentPage() {
+        return null;
+    }
+
+    @Override
+    public int currentPageSize() {
+        return 0;
+    }
+
+    @Override
+    public CompletionStage<? extends AsyncResultSet> fetchNextPage() {
+        return null;
+    }
+
+    @Override
+    public boolean hasMorePages() {
+        return false;
+    }
+
+    @Override
+    public CompletionStage<Void> closeAsync() {
+        return null;
+    }
+}

Reply via email to