[
https://issues.apache.org/jira/browse/FLINK-3926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15289230#comment-15289230
]
Yijie Shen commented on FLINK-3926:
-----------------------------------
We have the test case:
{code}
public void testAsWithNonFieldReference2() throws Exception {
ExecutionEnvironment env =
ExecutionEnvironment.getExecutionEnvironment();
BatchTableEnvironment tableEnv =
TableEnvironment.getTableEnvironment(env, config());
// Must fail. as() does only allow field name expressions
tableEnv.fromDataSet(CollectionDataSets.get3TupleDataSet(env),
"a as foo, b, c");
}
{code}
a is not a field in tupleDataSet, but we need to look it up from TupleTypeInfo.
> Incorrect implementation of getFieldIndex in TupleTypeInfo
> -----------------------------------------------------------
>
> Key: FLINK-3926
> URL: https://issues.apache.org/jira/browse/FLINK-3926
> Project: Flink
> Issue Type: Bug
> Components: Core
> Affects Versions: 1.0.2
> Reporter: Yijie Shen
> Assignee: Yijie Shen
> Priority: Minor
>
> The origin code assumes filed name as *f2* which is not always true.
> Finding a field *x* would result in NumberFormatException
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)