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 2021/09/02 11:38:35 UTC

[GitHub] [ignite] alex-plekhanov commented on a change in pull request #9364: Ignite-14593 : Calcite. Support bang-equal operator

alex-plekhanov commented on a change in pull request #9364:
URL: https://github.com/apache/ignite/pull/9364#discussion_r700999921



##########
File path: modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessorTest.java
##########
@@ -254,6 +255,35 @@ public void testCountWithJoin() throws Exception {
         awaitReservationsRelease("BATCH");
     }
 
+    /**
+     * Checks bang equal is allowed and works.
+     */
+    @Test
+    public void testBangEqual() throws Exception {
+        IgniteCache<Integer, Person> person = grid(1).createCache(new CacheConfiguration<Integer, Person>()
+            .setName("person")
+            .setSqlSchema("PUBLIC")
+            .setIndexedTypes(Integer.class, Person.class)
+            .setBackups(2)
+        );
+
+        person.put(1, new Person(1, "Test1"));
+        person.put(10, new Person(10, "Test2"));
+        person.put(100, new Person(100, "Test3"));
+
+        awaitPartitionMapExchange(true, true, null);
+
+        QueryEngine engine = Commons.lookupComponent(grid(1).context(), QueryEngine.class);
+
+        List<FieldsQueryCursor<List<?>>> res = engine.query(null, "PUBLIC",
+            "SELECT * FROM Person WHERE id != ?", 1);
+
+        assertEquals(1, res.size());
+
+        List<List<?>> rows = res.get(0).getAll();
+        assertEquals(2, rows.size());

Review comment:
       ```suggestion
           assertEquals(2, sql("SELECT * FROM Person WHERE id != ?", false, 1).size());
   ```




-- 
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