[ https://issues.apache.org/jira/browse/FLINK-9625?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
mingleizhang updated FLINK-9625: -------------------------------- Description: When the fields too many, and the types do not match with it would cause the below error. I think we should tell the users which field type does not match. Instead of only tell the users mismatch type which is. {code:java} Exception in thread "main" org.apache.flink.table.api.TableException: Result field does not match requested type. Requested: String; Actual: Integer at org.apache.flink.table.api.TableEnvironment$$anonfun$generateRowConverterFunction$1.apply(TableEnvironment.scala:953) at org.apache.flink.table.api.TableEnvironment$$anonfun$generateRowConverterFunction$1.apply(TableEnvironment.scala:944) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48) at org.apache.flink.table.api.TableEnvironment.generateRowConverterFunction(TableEnvironment.scala:944) at org.apache.flink.table.api.StreamTableEnvironment.getConversionMapperWithChanges(StreamTableEnvironment.scala:358) at org.apache.flink.table.api.StreamTableEnvironment.translate(StreamTableEnvironment.scala:794) at org.apache.flink.table.api.StreamTableEnvironment.translate(StreamTableEnvironment.scala:734) at org.apache.flink.table.api.java.StreamTableEnvironment.toRetractStream(StreamTableEnvironment.scala:414) at org.apache.flink.table.api.java.StreamTableEnvironment.toRetractStream(StreamTableEnvironment.scala:357) at router.StreamRouterRunning.main(StreamRouterRunning.java:76) {code} was: When the fields too many, and the types do not match with it would cause the below error. I think we should tell the users which field type does not match. {code:java} Exception in thread "main" org.apache.flink.table.api.TableException: Result field does not match requested type. Requested: String; Actual: Integer at org.apache.flink.table.api.TableEnvironment$$anonfun$generateRowConverterFunction$1.apply(TableEnvironment.scala:953) at org.apache.flink.table.api.TableEnvironment$$anonfun$generateRowConverterFunction$1.apply(TableEnvironment.scala:944) at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48) at org.apache.flink.table.api.TableEnvironment.generateRowConverterFunction(TableEnvironment.scala:944) at org.apache.flink.table.api.StreamTableEnvironment.getConversionMapperWithChanges(StreamTableEnvironment.scala:358) at org.apache.flink.table.api.StreamTableEnvironment.translate(StreamTableEnvironment.scala:794) at org.apache.flink.table.api.StreamTableEnvironment.translate(StreamTableEnvironment.scala:734) at org.apache.flink.table.api.java.StreamTableEnvironment.toRetractStream(StreamTableEnvironment.scala:414) at org.apache.flink.table.api.java.StreamTableEnvironment.toRetractStream(StreamTableEnvironment.scala:357) at router.StreamRouterRunning.main(StreamRouterRunning.java:76) {code} > Enrich the error information to user > ------------------------------------- > > Key: FLINK-9625 > URL: https://issues.apache.org/jira/browse/FLINK-9625 > Project: Flink > Issue Type: Improvement > Reporter: mingleizhang > Assignee: mingleizhang > Priority: Major > > When the fields too many, and the types do not match with it would cause the > below error. I think we should tell the users which field type does not > match. Instead of only tell the users mismatch type which is. > {code:java} > Exception in thread "main" org.apache.flink.table.api.TableException: Result > field does not match requested type. Requested: String; Actual: Integer > at > org.apache.flink.table.api.TableEnvironment$$anonfun$generateRowConverterFunction$1.apply(TableEnvironment.scala:953) > at > org.apache.flink.table.api.TableEnvironment$$anonfun$generateRowConverterFunction$1.apply(TableEnvironment.scala:944) > at > scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) > at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48) > at > org.apache.flink.table.api.TableEnvironment.generateRowConverterFunction(TableEnvironment.scala:944) > at > org.apache.flink.table.api.StreamTableEnvironment.getConversionMapperWithChanges(StreamTableEnvironment.scala:358) > at > org.apache.flink.table.api.StreamTableEnvironment.translate(StreamTableEnvironment.scala:794) > at > org.apache.flink.table.api.StreamTableEnvironment.translate(StreamTableEnvironment.scala:734) > at > org.apache.flink.table.api.java.StreamTableEnvironment.toRetractStream(StreamTableEnvironment.scala:414) > at > org.apache.flink.table.api.java.StreamTableEnvironment.toRetractStream(StreamTableEnvironment.scala:357) > at router.StreamRouterRunning.main(StreamRouterRunning.java:76) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)