[
https://issues.apache.org/jira/browse/FLINK-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15335700#comment-15335700
]
ASF GitHub Bot commented on FLINK-4077:
---------------------------------------
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/2107
> Register Pojo DataSet/DataStream as Table requires alias expression.
> --------------------------------------------------------------------
>
> Key: FLINK-4077
> URL: https://issues.apache.org/jira/browse/FLINK-4077
> Project: Flink
> Issue Type: Bug
> Components: Table API & SQL
> Affects Versions: 1.1.0
> Reporter: Fabian Hueske
> Assignee: Fabian Hueske
> Fix For: 1.1.0
>
>
> Registering a Pojo DataSet / DataStream as Table requires alias expressions
> and does not work with simple field references. However, alias expressions
> would only be necessary if the fields of the Pojo should be renamed.
> {code}
> DataStream<Person> persons = ...
> // DOES NOT WORK
> tEnv.registerDataStream(
> "Persons",
> persons,
> "name, age, address");
> // DOES WORK
> tEnv.registerDataStream(
> "Persons",
> persons,
> "name AS name, age AS age, address AS address");
> {code}
> We should also allow simple field name references in addition to alias
> expressions to rename fields.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)