@@ -103,7 +103,6 @@ public <T> T readValue(ClickHouseColumn column, Class<?> typeHint) throws IOExce
103103
104104 ClickHouseColumn actualColumn = column .getDataType () == ClickHouseDataType .Dynamic ? readDynamicData () : column ;
105105 ClickHouseDataType dataType = actualColumn .getDataType ();
106- int estimatedLen = actualColumn .getEstimatedLength ();
107106 int precision = actualColumn .getPrecision ();
108107 int scale = actualColumn .getScale ();
109108 TimeZone timezone = actualColumn .getTimeZoneOrDefault (timeZone );
@@ -112,11 +111,10 @@ public <T> T readValue(ClickHouseColumn column, Class<?> typeHint) throws IOExce
112111 switch (dataType ) {
113112 // Primitives
114113 case FixedString : {
115- int estimatedLenTemp = (estimatedLen > precision ? estimatedLen : precision );
116- byte [] bytes = estimatedLenTemp > STRING_BUFF .length ?
117- new byte [estimatedLenTemp ] : STRING_BUFF ;
118- readNBytes (input , bytes , 0 , estimatedLenTemp );
119- return (T ) new String (bytes , 0 , estimatedLenTemp , StandardCharsets .UTF_8 );
114+ byte [] bytes = precision > STRING_BUFF .length ?
115+ new byte [precision ] : STRING_BUFF ;
116+ readNBytes (input , bytes , 0 , precision );
117+ return (T ) new String (bytes , 0 , precision , StandardCharsets .UTF_8 );
120118 }
121119 case String : {
122120 return (T ) readString ();
0 commit comments