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/08/12 10:54:20 UTC

[jira] [Commented] (FLINK-4385) Union on Timestamp fields does not work

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

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

GitHub user wuchong opened a pull request:

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

    [FLINK-4385] [table] Union on Timestamp fields does not work

    Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.
    If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html).
    In addition to going through the list, please provide a meaningful description of your changes.
    
    - [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)
    
    - [ ] Documentation
      - Documentation has been added for new functionality
      - Old documentation affected by the pull request has been updated
      - JavaDoc for public methods has been added
    
    - [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
    
    This PR fix the problem mentioned in JIRA. The reason is that it will call `estimateRowSize` and encounter type mismatch for temporal types in batch mode.
    
    Another fix is the IntervalTypeInfo's Comparator instantiation, the constructor of TypeComparator should be `boolean`.
    


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

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

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

    https://github.com/apache/flink/pull/2362.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 #2362
    
----
commit dc2026e0a1034d947dc9f5b3a7eec5286d4429c0
Author: Jark Wu <wu...@alibaba-inc.com>
Date:   2016-08-12T09:48:23Z

    [FLINK-4385] [table] Union on Timestamp fields does not work

----


> Union on Timestamp fields does not work
> ---------------------------------------
>
>                 Key: FLINK-4385
>                 URL: https://issues.apache.org/jira/browse/FLINK-4385
>             Project: Flink
>          Issue Type: Bug
>          Components: Table API & SQL
>            Reporter: Timo Walther
>            Assignee: Jark Wu
>
> The following does not work:
> {code}
> public static class SDF {
> 	public Timestamp t = Timestamp.valueOf("1990-10-10 12:10:10");
> }
> ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
> DataSet<SDF> dataSet1 = env.fromElements(new SDF());
> DataSet<SDF> dataSet2 = env.fromElements(new SDF());
> BatchTableEnvironment tableEnv = TableEnvironment.getTableEnvironment(env);
> tableEnv.registerDataSet( "table0", dataSet1 );
> tableEnv.registerDataSet( "table1", dataSet2 );
> Table table = tableEnv.sql( "select t from table0 union select t from table1" );
> DataSet<Row> d = tableEnv.toDataSet(table, Row.class);
> d.print();
> {code}



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