Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-3129

truncation (from maxwidth) not indicated in output

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • Future
    • Client - CLI
    • None

    Description

      In SQLLine, when the display of a row is truncated because of the maxwidth variable, there is no indication that the row was truncated.

      In particular, the row's rendering into text seems to always include the final "|" (vertical bar character), which makes the row look complete:

      0: jdbc:drill:zk=local> !set maxwidth 14
      0: jdbc:drill:zk=local> !tables
      +------------+
      | TABLE_CAT  |
      +------------+
      | DRILL      |
      | DRILL      |
      | DRILL      |
      | DRILL      |
      | DRILL      |
      | DRILL      |
      | DRILL      |
      | DRILL      |
      | DRILL      |
      | DRILL      |
      | DRILL      |
      +------------+
      0: jdbc:drill:zk=local> !set maxwidth 15
      0: jdbc:drill:zk=local> !tables
      +-------------+
      | TABLE_CAT   |
      +-------------+
      | DRILL       |
      | DRILL       |
      | DRILL       |
      | DRILL       |
      | DRILL       |
      | DRILL       |
      | DRILL       |
      | DRILL       |
      | DRILL       |
      | DRILL       |
      | DRILL       |
      +-------------+
      0: jdbc:drill:zk=local> 
      

      If the untruncated rendering of the whole row were simply truncated to the maximum width, then, at in many cases, the line wouldn't end with a "|" and it would be clear that the output was truncated.

      (It wouldn't be clear if the truncation were at a width at which every visible line had a "|" or had "|" followed by whitespace.

      One solution would be to end truncated lines with "+" or "..." (something other than "|").

      Attachments

        Activity

          People

            Unassigned Unassigned
            dsbos Daniel Barclay
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: