File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
performance/src/test/com/clickhouse/benchmark/clients Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -162,19 +162,22 @@ public void insertV2RowBinary(DataState dataState) {
162162 try (InsertResponse response = clientV2 .insert (dataState .tableNameEmpty , out -> {
163163 RowBinaryFormatWriter w = new RowBinaryFormatWriter (out , dataState .dataSet .getSchema (), ClickHouseFormat .RowBinary );
164164 List <ClickHouseColumn > columns = dataState .dataSet .getSchema ().getColumns ();
165- for (Map <String , Object > row : dataState .dataSet .getRows ()) {
166- for (ClickHouseColumn column : columns ) {
167- w .setValue (column .getColumnName (),row .get (column .getColumnName ()));
165+ for (List <Object > row : dataState .dataSet .getRowsOrdered ()) {
166+ int index = 1 ;
167+ for (Object value : row ) {
168+ w .setValue (index , value );
169+ index ++;
168170 }
169171 w .commitRow ();
170172 }
171173 out .flush ();
172174
173- }, ClickHouseFormat .RowBinaryWithDefaults , new InsertSettings ()).get ()) {
175+ }, ClickHouseFormat .RowBinaryWithDefaults , new InsertSettings (). compressClientRequest ( true ) ).get ()) {
174176 response .getWrittenRows ();
175177 }
176178 } catch (Exception e ) {
177179 LOGGER .error ("Error: " , e );
178180 }
179181 }
182+
180183}
You can’t perform that action at this time.
0 commit comments