flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timo Walther (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-4385) Union on Timestamp fields does not work
Date Thu, 11 Aug 2016 17:37:20 GMT
Timo Walther created FLINK-4385:
-----------------------------------

             Summary: 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


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)

Mime
View raw message