[ 
https://issues.apache.org/jira/browse/CASSANDRA-18586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17732498#comment-17732498
 ] 

Maxim Muzafarov edited comment on CASSANDRA-18586 at 6/14/23 11:49 AM:
-----------------------------------------------------------------------

[~bschoeni] I don't have that much experience with Cassandra's tools, so I 
can't suggest the best solution we might have, but from a user's point of view, 
this task can be split down into two subtasks:
 - If the vertical line display is enabled ({{{}EXPAND ON{}}} command), I think 
we just need to limit the number of dashes for each row representation (or have 
other symbols to separate rows) to make the end result look more natural (or 
calculate the number of dashes for each row individually). Example:
 -- This is how it looks now:
[https://gist.github.com/Mmuzaf/d59c4f70d4a0f07ea0720fb575830e15]
 -- This is how it could look, so from my point of view it should be enough to 
have a simple line break or a symbol for {{{}@Row 1{}}}:
[https://gist.github.com/Mmuzaf/645f2bc0f83e6159dcf998c2906d8397]
 - If the horizontal display is enabled ({{{}EXPAND OFF{}}} command), the 
closest thing we might have is the {{.width}} command in sqlite (to limit the 
column size). I'm not sure if this will work for us, as I haven't delved into 
the cqlsh source code. 
[https://www.w3resource.com/sqlite/sqlite-dot-commands.php#width]


was (Author: mmuzaf):
[~bschoeni] I don't have that much experience with Cassandra's tools, so I 
can't suggest the best solution we might have, but from a user's point of view, 
this task can be split down into two subtasks:
 - If the vertical line display is enabled ({{{}EXPAND ON{}}} command), I think 
we just need to limit the number of dashes for each row representation (or have 
other symbols to separate rows) to make the end result look more natural. 
Example:
 -- This is how it looks now:
[https://gist.github.com/Mmuzaf/d59c4f70d4a0f07ea0720fb575830e15]
 -- This is how it could look, so from my point of view it should be enough to 
have a simple line break or a symbol for {{{}@Row 1{}}}:
[https://gist.github.com/Mmuzaf/645f2bc0f83e6159dcf998c2906d8397]
 - If the horizontal display is enabled ({{{}EXPAND OFF{}}} command), the 
closest thing we might have is the {{.width}} command in sqlite (to limit the 
column size). I'm not sure if this will work for us, as I haven't delved into 
the cqlsh source code. 
[https://www.w3resource.com/sqlite/sqlite-dot-commands.php#width]

> CQLSH formatting output is incorrect when querying the system properties 
> virtual table
> --------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-18586
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18586
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tool/cqlsh
>            Reporter: Maxim Muzafarov
>            Priority: Normal
>         Attachments: image-2023-06-12-19-01-34-086.png
>
>
> cqlsh produces incorrect output for the following query:
> {code:java}
> select * from system_views.system_properties;{code}
> See the screenshot:
> !image-2023-06-12-19-01-34-086.png|width=318,height=314!
> The reason for this is that the {{java.class.path}} system property has a 
> very long string representation value, so it breaks the formatting of the 
> query result. Changing the output format from horizontal query output to 
> vertical [1] doesn't help either.
> The formatting must be fixed.
> [1] 
> [https://docs.datastax.com/en/dse/5.1/cql/cql/cql_reference/cqlsh_commands/cqlshExpand.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to