[ https://issues.apache.org/jira/browse/FLINK-24473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17425647#comment-17425647 ]
Jark Wu commented on FLINK-24473: --------------------------------- >From the exception message, the field type is int type, so you can't use >{{getString}}. You should use {{getInt()}} can cast to string instead. If you are looking for a more general way to convert any type into string, you use {{org.apache.flink.table.data.RowData#createFieldGetter}} to get a {{FieldGetter}} which can get an Object from the RowData, and then use {{toString}} on the object. > getString value from any datatype columns > ----------------------------------------- > > Key: FLINK-24473 > URL: https://issues.apache.org/jira/browse/FLINK-24473 > Project: Flink > Issue Type: Improvement > Components: Table SQL / API > Affects Versions: 1.12.4 > Reporter: Spongebob > Priority: Minor > Attachments: image-2021-10-07-21-17-20-192.png > > > Hope flink would support getting string value from any other datatype column, > such as from int、decimal column. At current flink would throw cast exception > when we do that. > > !image-2021-10-07-21-17-20-192.png! -- This message was sent by Atlassian Jira (v8.3.4#803005)