You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2021/06/09 11:26:00 UTC
[jira] [Commented] (FLINK-22940) Make SQL client column max width
configurable
[ https://issues.apache.org/jira/browse/FLINK-22940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17359992#comment-17359992 ]
Jark Wu commented on FLINK-22940:
---------------------------------
+1 to make it configurable. I would be nice if we can support display entire content (default behavior of most systems, e.g. MySQL) instead of cutting.
I perfer not change the default length because other users may say why not use 40? 50? since xxx has 40 characters. I think a configurable length or default max length can resolve the problem.
> 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
> Priority: Minor
>
> 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)