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/08/01 07:20:03 UTC
[GitHub] [ignite-3] korlov42 commented on a diff in pull request #2372: IGNITE-18875 Sql. Drop AbstractPlannerTest.TestTable.
korlov42 commented on code in PR #2372:
URL: https://github.com/apache/ignite-3/pull/2372#discussion_r1280189438
##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/framework/TestBuilders.java:
##########
@@ -138,6 +138,8 @@ public interface TableBuilder extends TableBuilderBase<TableBuilder> {
/** Returns a builder of the test hash-index object. */
public HashIndexBuilder hashIndex();
+ TableBuilder colocationGroup(ColocationGroup colocationGroup);
Review Comment:
why do we need colocation group in TableBuilder? I mean, TableBuilder is meant to build table for planner tests, they don't need colocation group to be provided
##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/CorrelatedNestedLoopJoinPlannerTest.java:
##########
@@ -112,51 +83,29 @@ public IgniteDistribution distribution() {
*/
@Test
public void testInvalidIndexExpressions() throws Exception {
- IgniteSchema publicSchema = new IgniteSchema("PUBLIC");
- IgniteTypeFactory f = Commons.typeFactory();
-
- publicSchema.addTable(
- new TestTable(
- new RelDataTypeFactory.Builder(f)
- .add("ID", f.createJavaType(Integer.class))
- .add("JID", f.createJavaType(Integer.class))
- .add("VAL", f.createJavaType(String.class))
- .build(), "T0") {
-
- @Override
- public IgniteDistribution distribution() {
- return IgniteDistributions.broadcast();
- }
- }
- .addIndex("t0_jid_idx", 1, 0)
- );
-
- publicSchema.addTable(
- new TestTable(
- new RelDataTypeFactory.Builder(f)
- .add("ID", f.createJavaType(Integer.class))
- .add("JID", f.createJavaType(Integer.class))
- .add("VAL", f.createJavaType(String.class))
- .build(), "T1") {
-
- @Override
- public IgniteDistribution distribution() {
- return IgniteDistributions.broadcast();
- }
- }
- .addIndex("t1_jid_idx", 1, 0)
+ IgniteSchema publicSchema = createSchemaFrom(
+ tableA("T0").andThen(addHashIndex("JID", "ID")),
Review Comment:
> tableA("T0").andThen(addHashIndex("JID", "ID"))
This notation looks cool!
--
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