[jira] [Comment Edited] (FLINK-22968) Improve exception message when using toAppendStream[String]
[ https://issues.apache.org/jira/browse/FLINK-22968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17363608#comment-17363608 ] Nicholas Jiang edited comment on FLINK-22968 at 6/16/21, 11:59 AM: --- [~jark], as the 'toAppendStream' is soft-deprecated, there is no need to improve the message for this method and this issue could be closed. [~twalthr], what do you think about? was (Author: nicholasjiang): [~jark], If the 'toAppendStream' is deprecated, there is no need to improve the message for this method and this issue could be closed. [~twalthr], what do you think about? > Improve exception message when using toAppendStream[String] > --- > > Key: FLINK-22968 > URL: https://issues.apache.org/jira/browse/FLINK-22968 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.12.3, 1.13.1 > Environment: {color:#FF}*Flink-1.13.1 and Flink-1.12.1*{color} >Reporter: DaChun >Assignee: Nicholas Jiang >Priority: Major > Attachments: test.scala, this_error.txt > > > {code:scala} > package com.bytedance.one > import org.apache.flink.streaming.api.scala.{DataStream, > StreamExecutionEnvironment} > import org.apache.flink.table.api.Table > import org.apache.flink.table.api.bridge.scala.StreamTableEnvironment > import org.apache.flink.api.scala._ > object test { > def main(args: Array[String]): Unit = { > val env: StreamExecutionEnvironment = StreamExecutionEnvironment > .createLocalEnvironmentWithWebUI() > val stream: DataStream[String] = env.readTextFile("data/wc.txt") > val tableEnvironment: StreamTableEnvironment = > StreamTableEnvironment.create(env) > val table: Table = tableEnvironment.fromDataStream(stream) > tableEnvironment.createTemporaryView("wc", table) > val res: Table = tableEnvironment.sqlQuery("select * from wc") > tableEnvironment.toAppendStream[String](res).print() > env.execute("test") > } > } > {code} > When I run the program, the error is as follows: > The specific error is in this_ error.txt, > But the error prompts me to write an issue > Caused by: org.apache.flink.api.common.InvalidProgramException: Table program > cannot be compiled. This is a bug. Please file an issue. > It's very easy to read a stream and convert it into a table mode. The generic > type is string > Then an error is reported. The code is in test. Scala and the error is in > this_ error.txt > But I try to create an entity class by myself, and then assign generics to > this entity class, and then I can pass it normally, > Or with row type, do you have to create your own entity class, not with > string type? > h3. Summary > We should improve the exception message a bit, we can throw the given type > (String) is not allowed in {{toAppendStream}}. > > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (FLINK-22968) Improve exception message when using toAppendStream[String]
[ https://issues.apache.org/jira/browse/FLINK-22968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17363608#comment-17363608 ] Nicholas Jiang edited comment on FLINK-22968 at 6/16/21, 11:55 AM: --- [~jark], If the 'toAppendStream' is deprecated, there is no need to improve the message for this method and this issue could be closed. [~twalthr], what do you think about? was (Author: nicholasjiang): [~jark], If the 'toAppendStream' is deprecated, there is no need to improve the message for this method and this issue could be closed. [~twalthr], what do you think about? > Improve exception message when using toAppendStream[String] > --- > > Key: FLINK-22968 > URL: https://issues.apache.org/jira/browse/FLINK-22968 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.12.3, 1.13.1 > Environment: {color:#FF}*Flink-1.13.1 and Flink-1.12.1*{color} >Reporter: DaChun >Assignee: Nicholas Jiang >Priority: Major > Attachments: test.scala, this_error.txt > > > {code:scala} > package com.bytedance.one > import org.apache.flink.streaming.api.scala.{DataStream, > StreamExecutionEnvironment} > import org.apache.flink.table.api.Table > import org.apache.flink.table.api.bridge.scala.StreamTableEnvironment > import org.apache.flink.api.scala._ > object test { > def main(args: Array[String]): Unit = { > val env: StreamExecutionEnvironment = StreamExecutionEnvironment > .createLocalEnvironmentWithWebUI() > val stream: DataStream[String] = env.readTextFile("data/wc.txt") > val tableEnvironment: StreamTableEnvironment = > StreamTableEnvironment.create(env) > val table: Table = tableEnvironment.fromDataStream(stream) > tableEnvironment.createTemporaryView("wc", table) > val res: Table = tableEnvironment.sqlQuery("select * from wc") > tableEnvironment.toAppendStream[String](res).print() > env.execute("test") > } > } > {code} > When I run the program, the error is as follows: > The specific error is in this_ error.txt, > But the error prompts me to write an issue > Caused by: org.apache.flink.api.common.InvalidProgramException: Table program > cannot be compiled. This is a bug. Please file an issue. > It's very easy to read a stream and convert it into a table mode. The generic > type is string > Then an error is reported. The code is in test. Scala and the error is in > this_ error.txt > But I try to create an entity class by myself, and then assign generics to > this entity class, and then I can pass it normally, > Or with row type, do you have to create your own entity class, not with > string type? > h3. Summary > We should improve the exception message a bit, we can throw the given type > (String) is not allowed in {{toAppendStream}}. > > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (FLINK-22968) Improve exception message when using toAppendStream[String]
[ https://issues.apache.org/jira/browse/FLINK-22968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17363608#comment-17363608 ] Nicholas Jiang edited comment on FLINK-22968 at 6/16/21, 11:51 AM: --- [~jark], If the 'toAppendStream' is deprecated, there is no need to improve the message for this method and this issue could be closed. [~twalthr], what do you think about? was (Author: nicholasjiang): [~twalthr], as you mentioned, does this need to improve exception messages for toAppendStream? > Improve exception message when using toAppendStream[String] > --- > > Key: FLINK-22968 > URL: https://issues.apache.org/jira/browse/FLINK-22968 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.12.3, 1.13.1 > Environment: {color:#FF}*Flink-1.13.1 and Flink-1.12.1*{color} >Reporter: DaChun >Assignee: Nicholas Jiang >Priority: Major > Attachments: test.scala, this_error.txt > > > {code:scala} > package com.bytedance.one > import org.apache.flink.streaming.api.scala.{DataStream, > StreamExecutionEnvironment} > import org.apache.flink.table.api.Table > import org.apache.flink.table.api.bridge.scala.StreamTableEnvironment > import org.apache.flink.api.scala._ > object test { > def main(args: Array[String]): Unit = { > val env: StreamExecutionEnvironment = StreamExecutionEnvironment > .createLocalEnvironmentWithWebUI() > val stream: DataStream[String] = env.readTextFile("data/wc.txt") > val tableEnvironment: StreamTableEnvironment = > StreamTableEnvironment.create(env) > val table: Table = tableEnvironment.fromDataStream(stream) > tableEnvironment.createTemporaryView("wc", table) > val res: Table = tableEnvironment.sqlQuery("select * from wc") > tableEnvironment.toAppendStream[String](res).print() > env.execute("test") > } > } > {code} > When I run the program, the error is as follows: > The specific error is in this_ error.txt, > But the error prompts me to write an issue > Caused by: org.apache.flink.api.common.InvalidProgramException: Table program > cannot be compiled. This is a bug. Please file an issue. > It's very easy to read a stream and convert it into a table mode. The generic > type is string > Then an error is reported. The code is in test. Scala and the error is in > this_ error.txt > But I try to create an entity class by myself, and then assign generics to > this entity class, and then I can pass it normally, > Or with row type, do you have to create your own entity class, not with > string type? > h3. Summary > We should improve the exception message a bit, we can throw the given type > (String) is not allowed in {{toAppendStream}}. > > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (FLINK-22968) Improve exception message when using toAppendStream[String]
[ https://issues.apache.org/jira/browse/FLINK-22968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17361586#comment-17361586 ] Timo Walther edited comment on FLINK-22968 at 6/11/21, 10:12 AM: - [~DaChun777] {{toAppendStream}} is soft-deprecated in Flink 1.13. I would recommend to use `toDataStream` which should provide a better user experience. We wanted to give {{toDataStream}} some exposure before deprecating {{toAppendStream}}. But I think this will happen in 1.14. {{toDataStream}} supports {{toDataStream(result, String.class)}}. was (Author: twalthr): [~DaChun777] {{toAppendStream}} is soft-deprecated in Flink 1.13. I would recommend to use `toDataStream` which should provide a better user experience. We wanted to give {{toDataStream}} some exposure before deprecating {{toAppendStream}}. But I think this will happen in 1.14. > Improve exception message when using toAppendStream[String] > --- > > Key: FLINK-22968 > URL: https://issues.apache.org/jira/browse/FLINK-22968 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.12.3, 1.13.1 > Environment: {color:#FF}*Flink-1.13.1 and Flink-1.12.1*{color} >Reporter: DaChun >Assignee: Nicholas Jiang >Priority: Major > Attachments: test.scala, this_error.txt > > > {code:scala} > package com.bytedance.one > import org.apache.flink.streaming.api.scala.{DataStream, > StreamExecutionEnvironment} > import org.apache.flink.table.api.Table > import org.apache.flink.table.api.bridge.scala.StreamTableEnvironment > import org.apache.flink.api.scala._ > object test { > def main(args: Array[String]): Unit = { > val env: StreamExecutionEnvironment = StreamExecutionEnvironment > .createLocalEnvironmentWithWebUI() > val stream: DataStream[String] = env.readTextFile("data/wc.txt") > val tableEnvironment: StreamTableEnvironment = > StreamTableEnvironment.create(env) > val table: Table = tableEnvironment.fromDataStream(stream) > tableEnvironment.createTemporaryView("wc", table) > val res: Table = tableEnvironment.sqlQuery("select * from wc") > tableEnvironment.toAppendStream[String](res).print() > env.execute("test") > } > } > {code} > When I run the program, the error is as follows: > The specific error is in this_ error.txt, > But the error prompts me to write an issue > Caused by: org.apache.flink.api.common.InvalidProgramException: Table program > cannot be compiled. This is a bug. Please file an issue. > It's very easy to read a stream and convert it into a table mode. The generic > type is string > Then an error is reported. The code is in test. Scala and the error is in > this_ error.txt > But I try to create an entity class by myself, and then assign generics to > this entity class, and then I can pass it normally, > Or with row type, do you have to create your own entity class, not with > string type? > h3. Summary > We should improve the exception message a bit, we can throw the given type > (String) is not allowed in {{toAppendStream}}. > > > -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Comment Edited] (FLINK-22968) Improve exception message when using toAppendStream[String]
[ https://issues.apache.org/jira/browse/FLINK-22968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17361421#comment-17361421 ] DaChun edited comment on FLINK-22968 at 6/11/21, 5:55 AM: -- thanks you very much [~jark] ,ღ( ´・ Bi Xin. was (Author: dachun777): thanks you very much Jark Wu,love you. > Improve exception message when using toAppendStream[String] > --- > > Key: FLINK-22968 > URL: https://issues.apache.org/jira/browse/FLINK-22968 > Project: Flink > Issue Type: Bug > Components: Table SQL / API >Affects Versions: 1.12.3, 1.13.1 > Environment: {color:#FF}*Flink-1.13.1 and Flink-1.12.1*{color} >Reporter: DaChun >Assignee: Nicholas Jiang >Priority: Major > Attachments: test.scala, this_error.txt > > > {code:scala} > package com.bytedance.one > import org.apache.flink.streaming.api.scala.{DataStream, > StreamExecutionEnvironment} > import org.apache.flink.table.api.Table > import org.apache.flink.table.api.bridge.scala.StreamTableEnvironment > import org.apache.flink.api.scala._ > object test { > def main(args: Array[String]): Unit = { > val env: StreamExecutionEnvironment = StreamExecutionEnvironment > .createLocalEnvironmentWithWebUI() > val stream: DataStream[String] = env.readTextFile("data/wc.txt") > val tableEnvironment: StreamTableEnvironment = > StreamTableEnvironment.create(env) > val table: Table = tableEnvironment.fromDataStream(stream) > tableEnvironment.createTemporaryView("wc", table) > val res: Table = tableEnvironment.sqlQuery("select * from wc") > tableEnvironment.toAppendStream[String](res).print() > env.execute("test") > } > } > {code} > When I run the program, the error is as follows: > The specific error is in this_ error.txt, > But the error prompts me to write an issue > Caused by: org.apache.flink.api.common.InvalidProgramException: Table program > cannot be compiled. This is a bug. Please file an issue. > It's very easy to read a stream and convert it into a table mode. The generic > type is string > Then an error is reported. The code is in test. Scala and the error is in > this_ error.txt > But I try to create an entity class by myself, and then assign generics to > this entity class, and then I can pass it normally, > Or with row type, do you have to create your own entity class, not with > string type? > h3. Summary > We should improve the exception message a bit, we can throw the given type > (String) is not allowed in {{toAppendStream}}. > > > -- This message was sent by Atlassian Jira (v8.3.4#803005)