File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
jdbc-v2/src/main/java/com/clickhouse/data Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 22
33public class Tuple {
44 private final Object [] values ;
5-
5+ private volatile String output ;
66 public Tuple (Object ... values ) {
77 this .values = values ;
88 }
@@ -18,9 +18,7 @@ public Object getValue(int index) {
1818 public int size () {
1919 return values .length ;
2020 }
21-
22- @ Override
23- public String toString () {
21+ private String buildOutput () {
2422 StringBuilder sb = new StringBuilder ();
2523 sb .append ("(" );
2624 for (int i = 0 ; i < values .length ; i ++) {
@@ -32,4 +30,11 @@ public String toString() {
3230 sb .append (")" );
3331 return sb .toString ();
3432 }
33+ @ Override
34+ public String toString () {
35+ if (output == null ) {
36+ output = buildOutput ();
37+ }
38+ return output ;
39+ }
3540}
You can’t perform that action at this time.
0 commit comments