AMashenkov commented on code in PR #2455: URL: https://github.com/apache/ignite-3/pull/2455#discussion_r1299827934
########## modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/IdentityDistributionExecutionTest.java: ########## @@ -0,0 +1,147 @@ +/* + * 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.sql.engine.exec; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; + +import java.util.List; +import java.util.function.Function; +import java.util.function.UnaryOperator; +import java.util.stream.Collectors; +import java.util.stream.IntStream; +import org.apache.ignite.internal.schema.NativeTypes; +import org.apache.ignite.internal.sql.engine.AsyncCursor; +import org.apache.ignite.internal.sql.engine.framework.DataProvider; +import org.apache.ignite.internal.sql.engine.framework.TestBuilders; +import org.apache.ignite.internal.sql.engine.framework.TestBuilders.ClusterBuilder; +import org.apache.ignite.internal.sql.engine.framework.TestBuilders.ClusterTableBuilder; +import org.apache.ignite.internal.sql.engine.framework.TestCluster; +import org.apache.ignite.internal.sql.engine.framework.TestNode; +import org.apache.ignite.internal.sql.engine.planner.AbstractPlannerTest; +import org.apache.ignite.internal.sql.engine.prepare.QueryPlan; +import org.apache.ignite.internal.sql.engine.trait.IgniteDistributions; +import org.apache.ignite.internal.sql.engine.util.CursorUtils; +import org.junit.jupiter.api.Test; + +/** + * Execution test for {@link org.apache.ignite.internal.sql.engine.trait.DistributionFunction.IdentityDistribution} function. + */ +public class IdentityDistributionExecutionTest extends AbstractPlannerTest { + + private static final String NODE1_NAME = "node1"; + private static final String NODE2_NAME = "node2"; + private static final String NODE3_NAME = "node3"; + + @Test + public void joinTablesWithSameDistribution() { + TestCluster cluster = createClusterWith(identityTable("TEST_TBL1"), identityTable("TEST_TBL2")); + + cluster.start(); + + String sql = "select * " + + "from TEST_TBL1 t1 " + + "left join TEST_TBL2 t2 on t1.id = t2.id"; + + TestNode node = cluster.node(NODE1_NAME); + + QueryPlan queryPlan = node.prepare(sql); Review Comment: there was "left join". "inner join" look fine. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
