alex-plekhanov commented on code in PR #11438:
URL: https://github.com/apache/ignite/pull/11438#discussion_r1767346588


##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/AbstractTransactionalSqlTest.java:
##########
@@ -0,0 +1,196 @@
+/*
+ * 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.processors.query.calcite;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.calcite.CalciteQueryEngineConfiguration;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import 
org.apache.ignite.internal.processors.cache.transactions.TransactionProxyImpl;
+import org.apache.ignite.internal.processors.query.QueryContext;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+import org.apache.ignite.transactions.Transaction;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+
+import static 
org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
+import static 
org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
+
+/** */
+@RunWith(Parameterized.class)
+public abstract class AbstractTransactionalSqlTest extends 
GridCommonAbstractTest {

Review Comment:
   There are no children of this class, only static imports



##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/DataTypesTest.java:
##########
@@ -474,6 +446,9 @@ public void testNumericConversion() {
     /** */
     @Test
     public void testFunctionArgsToNumericImplicitConversion() {
+        if (sqlTxMode != SqlTransactionMode.NONE)

Review Comment:
   Can we add condition like in `executeSql`:
   ```
           if (sqlTxMode != SqlTransactionMode.NONE && tx == null)
               startTransaction(ignite);
   ```
   To `assertQuery` to avoid such checks in tests? 



##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/CorrelatesIntegrationTest.java:
##########
@@ -42,7 +42,7 @@ public void testCorrelatesAssignedBeforeAccess() {
      */
     @Test
     public void testCorrelatesWithTableSpool() {
-        sql("CREATE TABLE test(i1 INT, i2 INT)");
+        sql("CREATE TABLE test(i1 INT, i2 INT) WITH atomicity=transactional");

Review Comment:
   atomicity()



##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/ServerStatisticsIntegrationTest.java:
##########
@@ -484,23 +485,29 @@ protected QueryChecker assertQuerySrv(String qry) {
      * @param count Rows count.
      * @return Populated cache.
      */
-    protected IgniteCache<Integer, AllTypes> 
createAndPopulateAllTypesTable(int start, int count) {
-        IgniteCache<Integer, AllTypes> all_types = 
grid(0).getOrCreateCache(new CacheConfiguration<Integer, AllTypes>()
-            .setName("all_types")
-            .setSqlSchema("PUBLIC")
-            .setQueryEntities(F.asList(new QueryEntity(Integer.class, 
AllTypes.class).setTableName("all_types")))
-            .setBackups(2)
-        );
+    protected IgniteCache<Integer, AllTypes> populateAllTypesTable(int start, 
int count) {
+        IgniteCache<Integer, AllTypes> all_types = grid(0).cache("all_types");
 
         for (int i = start; i < start + count; i++) {
             boolean null_values = (i & 3) == 1;
 
-            all_types.put(i, new AllTypes(i, null_values));
+            put(grid(0), all_types, i, new AllTypes(i, null_values));
         }
 
         return all_types;
     }
 
+    /** */
+    private void createAllTypesTable() {
+        grid(0).getOrCreateCache(this.<Integer, AllTypes>cacheConfiguration()
+            .setName("all_types")
+            .setSqlSchema("PUBLIC")
+            .setQueryEntities(F.asList(new QueryEntity(Integer.class, 
AllTypes.class).setTableName("all_types")))
+            .setBackups(2)
+        );
+

Review Comment:
   Redundant NL



-- 
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-unsubscr...@ignite.apache.org

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

Reply via email to