DRILL-564: DRILL-442 broke DRILL-433 aka custom column width while printing results
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/8109f173 Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/8109f173 Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/8109f173 Branch: refs/heads/master Commit: 8109f1733bcebc02b10222fcce3be756a5562f83 Parents: ed51b3f Author: Aditya Kishore <[email protected]> Authored: Thu Apr 24 01:45:43 2014 -0700 Committer: Jacques Nadeau <[email protected]> Committed: Sat May 3 19:01:47 2014 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/drill/exec/util/VectorUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/8109f173/exec/java-exec/src/main/java/org/apache/drill/exec/util/VectorUtil.java ---------------------------------------------------------------------- diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/util/VectorUtil.java b/exec/java-exec/src/main/java/org/apache/drill/exec/util/VectorUtil.java index b48d3bd..a43225e 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/util/VectorUtil.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/util/VectorUtil.java @@ -102,7 +102,7 @@ public class VectorUtil { } else if (o instanceof byte[]) { String value = new String((byte[]) o); - System.out.printf("| %-15s",value.length() <= 15 ? value : value.substring(0, 14)); + System.out.printf(format, value.length() <= columnWidth ? value : value.substring(0, columnWidth - 1)); } else if (o instanceof List) { System.out.printf("| %s", o); } else {
