[prev in list] [next in list] [prev in thread] [next in thread]
List: cassandra-commits
Subject: [jira] [Commented] (CASSANDRA-19150) Align values in rows in CQLSH right for numbers, left for text
From: "Arun Ganesh (Jira)" <jira () apache ! org>
Date: 2024-03-31 3:37:00
Message-ID: JIRA.13560458.1701689381000.100742.1711856220047 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/CASSANDRA-19150?page=com.atlassian.jira.pl \
ugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17832516#comment-17832516 \
]
Arun Ganesh commented on CASSANDRA-19150:
-----------------------------------------
[~bschoeni] [~smiklosovic]
Sorry for the delay again. See [^test_output_old.txt] and [^test_output.txt] for the \
before and after.
These are some things I'd like to discuss before I write/fix the tests:
1. Does the design look okay? Or, should I use a map-lookup to get type->alignment \
values?
2. Should nulls be treated separately (like all null values align left), or should \
they be treated according to the type of the field (like nulls in vectors align \
right, nulls in maps align left, etc.)?
3. How should I align user-types and collections: left or right? I chose right \
because we were aligning everything to the right before.
4. Breaking all tests that depend on cqlsh, including downstream apps, doesn't seem \
like a great thing to do. Also, C* devs should not be burdened with type-alignment \
when they write tests---there should be a way to turn type-based alignment on/off. I \
suggest that we also introduce the `ALIGNMENT` command from the original description \
of this ticket. It can have `LEFT|RIGHT|DEFAULT` options. `DEFAULT` will align the \
output based on the types.
5. Should I document the alignment for the different types somewhere?
> 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-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic