[ 
https://issues.apache.org/jira/browse/FLINK-4244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15387907#comment-15387907
 ] 

ASF GitHub Bot commented on FLINK-4244:
---------------------------------------

GitHub user wuchong opened a pull request:

    https://github.com/apache/flink/pull/2280

    [FLINK-4244] [docs] Field names for union operator do not have to be equal

    We just merged FLINK-2985 , but not update the document. 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/wuchong/flink FLINK-4244

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2280.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 #2280
    
----
commit a3174fb89c7e2ab3e7bcb4f88c9ab3dbe7d47473
Author: Jark Wu <[email protected]>
Date:   2016-07-21T15:25:44Z

    [FLINK-4244] [docs] Field names for union operator do not have to be equal

----


> Field names for union operator do not have to be equal
> ------------------------------------------------------
>
>                 Key: FLINK-4244
>                 URL: https://issues.apache.org/jira/browse/FLINK-4244
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>    Affects Versions: 1.1.0
>            Reporter: Till Rohrmann
>            Assignee: Jark Wu
>            Priority: Trivial
>
> Flink Table API's documentation says that the schemas of unioned tables have 
> to be identical (wrt types and names). However, union works also with tables 
> where the types are identical but not the names:
> {code}
> val input1Seq = 0 until 10 map {x => (x, ('a' + x).toChar.toString, 
> x.toDouble)}
>     val input2Seq = 0 until 10 map {x => (x, ('a' + x).toChar.toString, 
> x.toDouble)}
>     val inputDS1 = env.fromCollection(input1Seq)
>     val inputDS2 = env.fromCollection(input2Seq)
>     val input1 = tblEnv.fromDataSet(inputDS1, 'a, 'b, 'c)
>     tblEnv.registerTable("foobar", input1)
>     val input2 = tblEnv.fromDataSet(inputDS2, 'd, 'e, 'f)
>     tblEnv.registerTable("foobar2", input2)
>     val result = tblEnv.sql("SELECT * FROM foobar UNION ALL SELECT * FROM 
> foobar2")
>     tblEnv.toDataSet[Row](result).print()
> {code}
> We should update the documentation accordingly.



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

Reply via email to