[ https://issues.apache.org/jira/browse/FLINK-22940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jark Wu closed FLINK-22940. --------------------------- Fix Version/s: 1.14.0 Resolution: Fixed Fixed in master: 84e1186d24ebbe6b3a4629496274d6337b333af1 > Make SQL client column max width configurable > --------------------------------------------- > > Key: FLINK-22940 > URL: https://issues.apache.org/jira/browse/FLINK-22940 > Project: Flink > Issue Type: Improvement > Components: Table SQL / Client > Affects Versions: 1.13.0 > Reporter: Svend Vanderveken > Assignee: Svend Vanderveken > Priority: Minor > Labels: pull-request-available > Fix For: 1.14.0 > > > When displaying results interactively with the Flink SQL client, each column > is currently truncated based on its content type, up to a maximum of 30 > characters, which is controlled by the java constant [1]. > In case some result to be displayed is too wide, a ~ is appended a the end > to indicate the truncation (actually happening in practice at position 25), > as visible below: > > > {code:java} > SELECT > metadata.true_as_of_timestamp_millis, > member_user_id > FROM some_table > > true_as_of_timestamp_mil~ member_user_id > 1622811665919 45ca821f-c0fc-4114-bef8-~ > 1622811665919 45ca821f-c0fc-4114-bef8-~ > 1622118951005 b4734391-d3e1-417c-ad92-~ > {code} > > I suggest to make this max width configurable, by adding a parameter that can > be `SET` to [2]. > > I also suggest to make the default width wide enough s.t. 36 usable > characters can be displayed, since UUID (which are 36 character longs when > represented in text) are very > commonly used as identifiers, and therefore as column values. > This seems like a easy code update, if it's useful I'm happy to work on the > implementation. > [1] > [https://github.com/apache/flink/blob/6d8c02f90a5a3054015f2f1ee83be821d925ccd1/flink-table/flink-table-common/src/main/java/org/apache/flink/table/utils/PrintUtils.java#L74] > [2] > [https://github.com/apache/flink/blob/master/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/config/SqlClientOptions.java] > -- This message was sent by Atlassian Jira (v8.3.4#803005)