You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Svend Vanderveken (Jira)" <ji...@apache.org> on 2021/06/09 06:18:00 UTC
[jira] [Updated] (FLINK-22940) Make SQL client column max column
widh configurable
[ https://issues.apache.org/jira/browse/FLINK-22940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Svend Vanderveken updated FLINK-22940:
--------------------------------------
Summary: Make SQL client column max column widh configurable (was: Make SQL column max column widh configurable)
> Make SQL client column max column widh 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)