Re: [Discuss] CQLSH should left-align numbers, right-align text (CASSANDRA-19150)

2024-01-16 Thread Brad
Hi Shailaja, In the case of machine readable output, CQL uses delimited output ('|') with whitespace on either side of the data values. To better support machine readable output, it might be useful to allow user specified delimiters (in a separate Jira). E.g.: cqlsh *-s","* -e"CAPTURE '/tmp/

Re: [Discuss] CQLSH should left-align numbers, right-align text (CASSANDRA-19150)

2024-01-15 Thread shailajakoppu
Hi Brad, While I prefer the indentation style that Postgres following for better readability of text, if we are changing it, this may break existing scripts of users/operators if tightly coupled with the current format/spaces etc (Ideally shouldn’t be, but as Cassandra being used all over the w

Re: [Discuss] CQLSH should left-align numbers, right-align text (CASSANDRA-19150)

2024-01-09 Thread Derek Chen-Becker
Actually, now that I'm looking at the original email on my browser and not my phone (and can see the formatting properly), I think we have the nomenclature backward here. Left-alignment in the printing world means that text in each cell starts at the left-most column for the cell, but in your examp

Re: [Discuss] CQLSH should left-align numbers, right-align text (CASSANDRA-19150)

2024-01-09 Thread Miklosovic, Stefan via dev
kes more sense to me overall in every situation (for strings) From: Derek Chen-Becker Sent: Tuesday, January 9, 2024 17:15 To: dev@cassandra.apache.org Subject: Re: [Discuss] CQLSH should left-align numbers, right-align text (CASSANDRA-19150) EXTERNAL EMAI

Re: [Discuss] CQLSH should left-align numbers, right-align text (CASSANDRA-19150)

2024-01-09 Thread Derek Chen-Becker
In the ticket itself there's an example of left aligned being better for prefix strings (e.g. fully qualified class names), and I suspect this is similarly useful for other things like file paths, etc. I would also agree with Stefan that it would be nice to know why the current convention was chose

Re: [Discuss] CQLSH should left-align numbers, right-align text (CASSANDRA-19150)

2024-01-09 Thread Miklosovic, Stefan via dev
left-align numbers, right-align text (CASSANDRA-19150) EXTERNAL EMAIL - USE CAUTION when clicking links or attachments A configuration option for a cosmetic feature seems like overkill to me, I don't think which side we align text on is enough to justify (heh) the overhead. I agree wit

Re: [Discuss] CQLSH should left-align numbers, right-align text (CASSANDRA-19150)

2024-01-09 Thread Brandon Williams
A configuration option for a cosmetic feature seems like overkill to me, I don't think which side we align text on is enough to justify (heh) the overhead. I agree with how Excel and Postgres do it and think we should follow suit. Kind Regards, Brandon On Tue, Jan 9, 2024 at 9:19 AM Brad wrote

Re: [Discuss] CQLSH should left-align numbers, right-align text (CASSANDRA-19150)

2024-01-09 Thread Brad
Derek, I'm proposing a switch or blanket change to a convention of right aligned text and left aligned numbers in CQLSH. I took a look at two other examples, Excel and Postgres shell and that's how they work when displaying tabular data. The Jira was originally to make right or left alignment an

Re: [Discuss] CQLSH should left-align numbers, right-align text (CASSANDRA-19150)

2024-01-09 Thread Derek Chen-Becker
Just to clarify, per the ticket you're proposing a configuration option to control this on a per-column basis, correct? Your email makes it sound like a blanket change. Cheers, Derek On Tue, Jan 9, 2024 at 7:34 AM Brad wrote: > CQLSH currently left-aligns all output, affecting both numbers and

[Discuss] CQLSH should left-align numbers, right-align text (CASSANDRA-19150)

2024-01-09 Thread Brad
CQLSH currently left-aligns all output, affecting both numbers and text. While this works well for numbers, a better approach adopted by many is to left align numbers and right align text. For example, both Excel and Postgres shell use the later: psql # select * from employee; empid | name