You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "korlov42 (via GitHub)" <gi...@apache.org> on 2023/06/29 06:48:09 UTC

[GitHub] [ignite-3] korlov42 commented on a diff in pull request #2265: IGNITE-19775 Add index builder to TestBuilders

korlov42 commented on code in PR #2265:
URL: https://github.com/apache/ignite-3/pull/2265#discussion_r1246181578


##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/framework/TestClusterTest.java:
##########
@@ -67,4 +74,19 @@ public void testSimpleQuery() {
             assertNotNull(row);
         }
     }
+
+    /**
+     * Runs a SELECT query with condition.
+     */
+    @Test
+    public void testQueryWithCondition() {

Review Comment:
   Not sure I understand why do we need this test



##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/framework/TestClusterTest.java:
##########
@@ -45,6 +46,12 @@ public class TestClusterTest {
             .addColumn("VAL", NativeTypes.stringOf(64))
             .defaultDataProvider(dataProvider)
             .end()
+            .addHashIndex()

Review Comment:
   It would be better to make index builder as child of table builder: 
   
   ```
   TestBuilders.cluster()
       .nodes("N1")
       .addTable()
           .name("T1")
           .distribution(IgniteDistributions.hash(List.of(0)))
               .addColumn("ID", NativeTypes.INT32)
               .addColumn("VAL", NativeTypes.stringOf(64))
               .defaultDataProvider(dataProvider)
               .addHashIndex()
                   .name("IDX_ID")
                   .addColumn("ID")
                   .defaultDataProvider(dataProvider)
               .end()
           .end()
   ```



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