Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
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 "|").