You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/15 16:29:09 UTC
[jira] [Commented] (FLINK-4077) Register Pojo DataSet/DataStream as
Table requires alias expression.
[ https://issues.apache.org/jira/browse/FLINK-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15332025#comment-15332025 ]
ASF GitHub Bot commented on FLINK-4077:
---------------------------------------
GitHub user fhueske opened a pull request:
https://github.com/apache/flink/pull/2107
[FLINK-4077] Register Pojo DataSet/DataStream as Table with field references
- [X] General
- The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text")
- The pull request addresses only one issue
- Each commit in the PR has a meaningful commit message (including the JIRA id)
- [X] Tests & Build
- Functionality added by the pull request is covered by tests
- `mvn clean verify` has been executed successfully locally or a Travis build has passed
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/fhueske/flink tablePojoInput
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/2107.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2107
----
commit 7e394b4097af95bc2ddfd7c33a69ba3188b5e17b
Author: Fabian Hueske <fh...@apache.org>
Date: 2016-06-15T15:12:10Z
[FLINK-4077] Register Pojo DataSet/DataStream as Table with field references.
----
> 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
> 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)