[jira] [Commented] (FLINK-10999) Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast to java.lang.Long
[ https://issues.apache.org/jira/browse/FLINK-10999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697745#comment-16697745 ] ideal-hp commented on FLINK-10999: -- Thank you for your help! I updated the update in detail at https://github.com/harbby/sylph/issues/23 > Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast > to java.lang.Long > --- > > Key: FLINK-10999 > URL: https://issues.apache.org/jira/browse/FLINK-10999 > Project: Flink > Issue Type: Bug > Components: Table API SQL >Affects Versions: 1.5.5, 1.6.2 >Reporter: ideal-hp >Priority: Major > > Caused by: java.lang.ClassCastException: java.sql.Timestamp cannot be cast to > java.lang.Long > at > org.apache.flink.api.common.typeutils.base.LongSerializer.copy(LongSerializer.java:27) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:95) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:46) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:577) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) > at > org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:41) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:579) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) > at > org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51) > at > org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:37) > at > org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:28) > at DataStreamCalcRule$15.processElement(Unknown Source) > at > org.apache.flink.table.runtime.CRowProcessRunner.processElement(CRowProcessRunner.scala:66) > at > org.apache.flink.table.runtime.CRowProcessRunner.processElement(CRowProcessRunner.scala:35) > at > org.apache.flink.streaming.api.operators.ProcessOperator.processElement(ProcessOperator.java:66) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:579) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-10999) Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast to java.lang.Long
[ https://issues.apache.org/jira/browse/FLINK-10999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697730#comment-16697730 ] ideal-hp commented on FLINK-10999: -- [~x1q1j1]: Hi, I am very sorry, my expression is not clear. I re-describe: When `tableEnv.registerDataStream` is used multiple times, specifying `proctime.proctime` or `rowtime.rowtime` will cause this error. I have a more detailed description and reproduction here. see: https://github.com/harbby/sylph/issues/23 > Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast > to java.lang.Long > --- > > Key: FLINK-10999 > URL: https://issues.apache.org/jira/browse/FLINK-10999 > Project: Flink > Issue Type: Bug > Components: Table API SQL >Affects Versions: 1.5.5, 1.6.2 >Reporter: ideal-hp >Priority: Major > > Caused by: java.lang.ClassCastException: java.sql.Timestamp cannot be cast to > java.lang.Long > at > org.apache.flink.api.common.typeutils.base.LongSerializer.copy(LongSerializer.java:27) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:95) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:46) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:577) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) > at > org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:41) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:579) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) > at > org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51) > at > org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:37) > at > org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:28) > at DataStreamCalcRule$15.processElement(Unknown Source) > at > org.apache.flink.table.runtime.CRowProcessRunner.processElement(CRowProcessRunner.scala:66) > at > org.apache.flink.table.runtime.CRowProcessRunner.processElement(CRowProcessRunner.scala:35) > at > org.apache.flink.streaming.api.operators.ProcessOperator.processElement(ProcessOperator.java:66) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:579) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (FLINK-10999) Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast to java.lang.Long
[ https://issues.apache.org/jira/browse/FLINK-10999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697629#comment-16697629 ] ideal-hp edited comment on FLINK-10999 at 11/24/18 6:11 AM: public static DataStream getSource(StreamTableEnvironment tableEnv){ Table table = tableEnv.sqlQuery("SELECT * FROM (VALUES ('Bob'), ('Lucy')) AS NameTable(name)"); return tableEnv.toAppendStream(table, String.class); } public static void run(StreamTableEnvironment tableEnv) throws Exception { DataStream inputStream = getSource(tableEnv); //add proctime.proctime Table tb1 = tableEnv.fromDataStream(inputStream, "name,proctime.proctime"); DataStream stream1 = tableEnv.toAppendStream(tb1, Row.class); stream1.getTransformation().setOutputType(tb1.getSchema().toRowType()); //--Use rowtime.proctime here to simulate rowtime.rowtime Table tb2 = tableEnv.fromDataStream(stream1, "name,proctime,rowtime.proctime"); tableEnv.toAppendStream(tb2, Row.class).print(); System.out.println("**"); System.out.println(tableEnv.execEnv().getExecutionPlan()); System.out.println("*There are no errors here.*"); //---Running directly below will start to go wrong tableEnv.execEnv().execute(); } was (Author: harbby): public static DataStream getSource(StreamTableEnvironment tableEnv){ Table table = tableEnv.sqlQuery("SELECT * FROM (VALUES ('Bob'), ('Lucy')) AS NameTable(name)"); return tableEnv.toAppendStream(table, String.class); } public static void run(StreamTableEnvironment tableEnv) throws Exception { DataStream inputStream = getSource(tableEnv); //add proctime.proctime Table tb1 = tableEnv.fromDataStream(inputStream, "name,proctime.proctime"); DataStream stream1 = tableEnv.toAppendStream(tb1, Row.class); stream1.getTransformation().setOutputType(tb1.getSchema().toRowType()); //--Use rowtime.proctime here to simulate rowtime.rowtime Table tb2 = tableEnv.fromDataStream(stream1, "name,proctime,rowtime.proctime"); tableEnv.toAppendStream(tb2, Row.class).print(); System.out.println("**"); System.out.println(tableEnv.execEnv().getExecutionPlan()); System.out.println("*There are no errors here.*"); //---Running directly below will start to go wrong tableEnv.execEnv().execute(); } > Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast > to java.lang.Long > --- > > Key: FLINK-10999 > URL: https://issues.apache.org/jira/browse/FLINK-10999 > Project: Flink > Issue Type: Bug > Components: Table API SQL >Affects Versions: 1.5.5, 1.6.2 >Reporter: ideal-hp >Priority: Major > > Caused by: java.lang.ClassCastException: java.sql.Timestamp cannot be cast to > java.lang.Long > at > org.apache.flink.api.common.typeutils.base.LongSerializer.copy(LongSerializer.java:27) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:95) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:46) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:577) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) > at > org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:41) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:579) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) > at > org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51) > at >
[jira] [Created] (FLINK-10999) Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast to java.lang.Long
ideal-hp created FLINK-10999: Summary: Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast to java.lang.Long Key: FLINK-10999 URL: https://issues.apache.org/jira/browse/FLINK-10999 Project: Flink Issue Type: Bug Components: Table API SQL Affects Versions: 1.6.2, 1.5.5 Reporter: ideal-hp Caused by: java.lang.ClassCastException: java.sql.Timestamp cannot be cast to java.lang.Long at org.apache.flink.api.common.typeutils.base.LongSerializer.copy(LongSerializer.java:27) at org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:95) at org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:46) at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:577) at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) at org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:41) at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:579) at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) at org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51) at org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:37) at org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:28) at DataStreamCalcRule$15.processElement(Unknown Source) at org.apache.flink.table.runtime.CRowProcessRunner.processElement(CRowProcessRunner.scala:66) at org.apache.flink.table.runtime.CRowProcessRunner.processElement(CRowProcessRunner.scala:35) at org.apache.flink.streaming.api.operators.ProcessOperator.processElement(ProcessOperator.java:66) at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:579) at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) at org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) at org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FLINK-10999) Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast to java.lang.Long
[ https://issues.apache.org/jira/browse/FLINK-10999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697629#comment-16697629 ] ideal-hp commented on FLINK-10999: -- To reproduce this problem I have provided the following script: ``` public static DataStream getSource(StreamTableEnvironment tableEnv){ Table table = tableEnv.sqlQuery("SELECT * FROM (VALUES ('Bob'), ('Lucy')) AS NameTable(name)"); return tableEnv.toAppendStream(table, String.class); } public static void run(StreamTableEnvironment tableEnv) throws Exception { DataStream inputStream = getSource(tableEnv); //add proctime.proctime Table tb1 = tableEnv.fromDataStream(inputStream, "name,proctime.proctime"); DataStream stream1 = tableEnv.toAppendStream(tb1, Row.class); stream1.getTransformation().setOutputType(tb1.getSchema().toRowType()); //--Use rowtime.proctime here to simulate rowtime.rowtime Table tb2 = tableEnv.fromDataStream(stream1, "name,proctime,rowtime.proctime"); tableEnv.toAppendStream(tb2, Row.class).print(); System.out.println("**"); System.out.println(tableEnv.execEnv().getExecutionPlan()); System.out.println("*There are no errors here.*"); //---Running directly below will start to go wrong tableEnv.execEnv().execute(); } ``` > Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast > to java.lang.Long > --- > > Key: FLINK-10999 > URL: https://issues.apache.org/jira/browse/FLINK-10999 > Project: Flink > Issue Type: Bug > Components: Table API SQL >Affects Versions: 1.5.5, 1.6.2 >Reporter: ideal-hp >Priority: Major > > Caused by: java.lang.ClassCastException: java.sql.Timestamp cannot be cast to > java.lang.Long > at > org.apache.flink.api.common.typeutils.base.LongSerializer.copy(LongSerializer.java:27) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:95) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:46) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:577) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) > at > org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:41) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:579) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) > at > org.apache.flink.streaming.api.operators.TimestampedCollector.collect(TimestampedCollector.java:51) > at > org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:37) > at > org.apache.flink.table.runtime.CRowWrappingCollector.collect(CRowWrappingCollector.scala:28) > at DataStreamCalcRule$15.processElement(Unknown Source) > at > org.apache.flink.table.runtime.CRowProcessRunner.processElement(CRowProcessRunner.scala:66) > at > org.apache.flink.table.runtime.CRowProcessRunner.processElement(CRowProcessRunner.scala:35) > at > org.apache.flink.streaming.api.operators.ProcessOperator.processElement(ProcessOperator.java:66) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:579) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (FLINK-10999) Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast to java.lang.Long
[ https://issues.apache.org/jira/browse/FLINK-10999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697629#comment-16697629 ] ideal-hp edited comment on FLINK-10999 at 11/24/18 4:03 AM: public static DataStream getSource(StreamTableEnvironment tableEnv){ Table table = tableEnv.sqlQuery("SELECT * FROM (VALUES ('Bob'), ('Lucy')) AS NameTable(name)"); return tableEnv.toAppendStream(table, String.class); } public static void run(StreamTableEnvironment tableEnv) throws Exception { DataStream inputStream = getSource(tableEnv); //add proctime.proctime Table tb1 = tableEnv.fromDataStream(inputStream, "name,proctime.proctime"); DataStream stream1 = tableEnv.toAppendStream(tb1, Row.class); stream1.getTransformation().setOutputType(tb1.getSchema().toRowType()); //--Use rowtime.proctime here to simulate rowtime.rowtime Table tb2 = tableEnv.fromDataStream(stream1, "name,proctime,rowtime.proctime"); tableEnv.toAppendStream(tb2, Row.class).print(); System.out.println("**"); System.out.println(tableEnv.execEnv().getExecutionPlan()); System.out.println("*There are no errors here.*"); //---Running directly below will start to go wrong tableEnv.execEnv().execute(); } was (Author: harbby): To reproduce this problem I have provided the following script: ``` public static DataStream getSource(StreamTableEnvironment tableEnv){ Table table = tableEnv.sqlQuery("SELECT * FROM (VALUES ('Bob'), ('Lucy')) AS NameTable(name)"); return tableEnv.toAppendStream(table, String.class); } public static void run(StreamTableEnvironment tableEnv) throws Exception { DataStream inputStream = getSource(tableEnv); //add proctime.proctime Table tb1 = tableEnv.fromDataStream(inputStream, "name,proctime.proctime"); DataStream stream1 = tableEnv.toAppendStream(tb1, Row.class); stream1.getTransformation().setOutputType(tb1.getSchema().toRowType()); //--Use rowtime.proctime here to simulate rowtime.rowtime Table tb2 = tableEnv.fromDataStream(stream1, "name,proctime,rowtime.proctime"); tableEnv.toAppendStream(tb2, Row.class).print(); System.out.println("**"); System.out.println(tableEnv.execEnv().getExecutionPlan()); System.out.println("*There are no errors here.*"); //---Running directly below will start to go wrong tableEnv.execEnv().execute(); } ``` > Adding time multiple times causes Runtime : java.sql.Timestamp cannot be cast > to java.lang.Long > --- > > Key: FLINK-10999 > URL: https://issues.apache.org/jira/browse/FLINK-10999 > Project: Flink > Issue Type: Bug > Components: Table API SQL >Affects Versions: 1.5.5, 1.6.2 >Reporter: ideal-hp >Priority: Major > > Caused by: java.lang.ClassCastException: java.sql.Timestamp cannot be cast to > java.lang.Long > at > org.apache.flink.api.common.typeutils.base.LongSerializer.copy(LongSerializer.java:27) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:95) > at > org.apache.flink.api.java.typeutils.runtime.RowSerializer.copy(RowSerializer.java:46) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:577) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) > at > org.apache.flink.streaming.api.operators.StreamMap.processElement(StreamMap.java:41) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.pushToOperator(OperatorChain.java:579) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:554) > at > org.apache.flink.streaming.runtime.tasks.OperatorChain$CopyingChainingOutput.collect(OperatorChain.java:534) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:689) > at > org.apache.flink.streaming.api.operators.AbstractStreamOperator$CountingOutput.collect(AbstractStreamOperator.java:667) > at >