You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Fabian Hueske (JIRA)" <ji...@apache.org> on 2014/12/15 17:28:14 UTC

[jira] [Updated] (FLINK-1156) Bug in Constant Fields Annotation (Semantic Properties)

     [ https://issues.apache.org/jira/browse/FLINK-1156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fabian Hueske updated FLINK-1156:
---------------------------------
    Issue Type: Sub-task  (was: Bug)
        Parent: FLINK-1328

> Bug in Constant Fields Annotation (Semantic Properties) 
> --------------------------------------------------------
>
>                 Key: FLINK-1156
>                 URL: https://issues.apache.org/jira/browse/FLINK-1156
>             Project: Flink
>          Issue Type: Sub-task
>            Reporter: Aljoscha Krettek
>
> When I change the first test in SemanticPropUtilTest.java to this:
> {code}
> @Test
> public void testConstantWithArrowIndividualStrings() {
> 	String[] constantFields = { "0->0,1", "1->3" };
> 	TypeInformation<?> type = new TupleTypeInfo<Tuple3<Integer, Integer, Integer>>(BasicTypeInfo.INT_TYPE_INFO,
> 			BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO);
> 	TypeInformation<?> outType = new TupleTypeInfo<Tuple4<Integer, Integer, Integer, Integer>>(BasicTypeInfo.INT_TYPE_INFO,
> 			BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO);
> 	SingleInputSemanticProperties sp = SemanticPropUtil.getSemanticPropsSingleFromString(constantFields, null, null, type, outType);
> 	FieldSet fs = sp.getForwardedField(0);
> 	Assert.assertTrue(fs.size() == 2);
> 	Assert.assertTrue(fs.contains(0));
> 	Assert.assertTrue(fs.contains(1));
> 	fs = sp.getForwardedField(1);
> 	Assert.assertTrue(fs.size() == 1);
> 	Assert.assertTrue(fs.contains(2));
> }
> {code}
> It fails. It seems the check whether a tuple field is in range is performed on the input type and the output type is being ignored.
> Also, I'm not sure this whole thing works anymore with [~rmetzger]'s recent POJO rework and nested tuple field selection rework.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)