Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-19150

Align values in rows in CQLSH right for numbers, left for text

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: In Progress
    • Low
    • Resolution: Unresolved
    • 5.x
    • CQL/Interpreter
    • None
    • Operability
    • Low Hanging Fruit
    • All
    • None

    Description

      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

      ALIGNMENT LEFT|RIGHT
      

      cc bschoeni

      Attachments

        1. Screenshot 2023-12-04 at 00.38.16.png
          1.33 MB
          Maxim Muzafarov
        2. Screenshot 2023-12-09 at 16.58.25.png
          1.03 MB
          Maxim Muzafarov
        3. signature.asc
          0.5 kB
          miklosovic
        4. test_output_old.txt
          3 kB
          Arun Ganesh
        5. test_output.txt
          3 kB
          Arun Ganesh

        Issue Links

          Activity

            People

              arkn98 Arun Ganesh
              smiklosovic Stefan Miklosovic
              Arun Ganesh
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m