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

Arun Ganesh commented on CASSANDRA-19150:
-----------------------------------------

[~bschoeni],

Thanks for the review! I'm sorry I was not available for a while because of my 
finals.

#2 and #3 sounds good. For #4, I don't have the exact count because I don't 
have a paid CircleCI account, and I can see some dtests using the cqlsh output 
(like this 
[one|https://github.com/apache/cassandra-dtest/blob/trunk/json_test.py]).

Regarding #1, everything except "This could be generalized to a multi-value map 
for types" sounds good, because I see a lot of inline uses of the color map, 
like
{code:python}
coloredval = colormap['text'] + bits_to_turn_red_re.sub(tbr, bval) + 
colormap['reset']
{code}

Changing this map to include the alignment too would require changes in a lot 
of places.

Let me update my PR.

> Align values in rows in CQLSH right for numbers, left for text
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-19150
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19150
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL/Interpreter
>            Reporter: Stefan Miklosovic
>            Assignee: Arun Ganesh
>            Priority: Low
>             Fix For: 5.x
>
>         Attachments: Screenshot 2023-12-04 at 00.38.16.png, Screenshot 
> 2023-12-09 at 16.58.25.png, signature.asc, test_output.txt, 
> test_output_old.txt
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> *Updated* Jan 17 2024 after dev discussion
> Change CQLSH to left-align text while continue to right-align numbers.  This 
> will match how Postgres shell and Excel treat alignment of text and number.
> -------------
> *Original*
> We need to make this
> [https://github.com/apache/cassandra/blob/trunk/pylib/cqlshlib/cqlshmain.py#L1101]
> configurable so values in columns are either all on left or on right side of 
> the column (basically change col.rjust to col.ljust).
> By default, it would be like it is now but there would be configuration 
> property in cqlsh for that as well as a corresponding CQLSH command 
> (optional), something like
> {code:java}
> ALIGNMENT LEFT|RIGHT
> {code}
> cc [~bschoeni]



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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to