You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Daniel Barclay (Drill) (JIRA)" <ji...@apache.org> on 2015/05/18 08:19:00 UTC

[jira] [Created] (DRILL-3129) truncation (from maxwidth) not indicated in output

Daniel Barclay (Drill) created DRILL-3129:
---------------------------------------------

             Summary: truncation (from maxwidth) not indicated in output
                 Key: DRILL-3129
                 URL: https://issues.apache.org/jira/browse/DRILL-3129
             Project: Apache Drill
          Issue Type: Bug
          Components: Client - CLI
            Reporter: Daniel Barclay (Drill)
            Assignee: Daniel Barclay (Drill)


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:

{noformat}
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> 
{noformat}


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 "|").




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)