[ https://issues.apache.org/jira/browse/FLINK-703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14502998#comment-14502998 ]
ASF GitHub Bot commented on FLINK-703: -------------------------------------- Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/572#discussion_r28696976 --- Diff: flink-tests/src/test/java/org/apache/flink/test/javaApiOperators/JoinITCase.java --- @@ -663,6 +663,39 @@ public void testNonPojoToVerifyNestedTupleElementSelectionWithFirstKeyFieldGreat "((3,2,Hello world),(3,2,Hello world)),((3,2,Hello world),(3,2,Hello world))\n"; } + @Test + public void testJoinWithAtomicType1() throws Exception { + final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); + + DataSet<Tuple3<Integer, Long, String>> ds1 = CollectionDataSets.getSmall3TupleDataSet(env); + DataSet<Integer> ds2 = env.fromElements(1, 2); + + DataSet<Tuple2<Tuple3<Integer, Long, String>, Integer>> joinDs = ds1.join(ds2).where(0).equalTo("*"); + + joinDs.writeAsCsv(resultPath); + env.setParallelism(1); + env.execute(); + + expected = "(1,1,Hi),1\n" + + "(2,2,Hello),2"; + } + + public void testJoinWithAtomicType2() throws Exception { + final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); + + DataSet<Integer> ds1 = env.fromElements(1, 2); + DataSet<Tuple3<Integer, Long, String>> ds2 = CollectionDataSets.getSmall3TupleDataSet(env); + + DataSet<Tuple2<Integer, Tuple3<Integer, Long, String>>> joinDs = ds1.join(ds2).where("*").equalTo(0); + + joinDs.writeAsCsv(resultPath); + env.setParallelism(1); --- End diff -- Why parallelism == 1? > Use complete element as join key. > --------------------------------- > > Key: FLINK-703 > URL: https://issues.apache.org/jira/browse/FLINK-703 > Project: Flink > Issue Type: Improvement > Reporter: GitHub Import > Assignee: Chiwan Park > Priority: Trivial > Labels: github-import > Fix For: pre-apache > > > In some situations such as semi-joins it could make sense to use a complete > element as join key. > Currently this can be done using a key-selector function, but we could offer > a shortcut for that. > This is not an urgent issue, but might be helpful. > ---------------- Imported from GitHub ---------------- > Url: https://github.com/stratosphere/stratosphere/issues/703 > Created by: [fhueske|https://github.com/fhueske] > Labels: enhancement, java api, user satisfaction, > Milestone: Release 0.6 (unplanned) > Created at: Thu Apr 17 23:40:00 CEST 2014 > State: open -- This message was sent by Atlassian JIRA (v6.3.4#6332)