@@ -68,9 +68,8 @@ protected Client.Builder newClient() {
6868 .addEndpoint (Protocol .HTTP , node .getHost (), node .getPort (), isSecure )
6969 .setUsername ("default" )
7070 .setPassword (ClickHouseServerForTest .getPassword ())
71- .compressClientRequest (true )
72- .useHttpCompression (true )
7371 .setDefaultDatabase (ClickHouseServerForTest .getDatabase ())
72+ .serverSetting (ServerSettings .INPUT_FORMAT_BINARY_READ_JSON_AS_STRING , "1" )
7473 .serverSetting (ServerSettings .ASYNC_INSERT , "0" )
7574 .serverSetting (ServerSettings .WAIT_END_OF_QUERY , "1" );
7675 }
@@ -625,13 +624,16 @@ public void writeJsonTests() throws Exception {
625624 String tableName = "rowBinaryFormatWriterTest_writeJsonTests_" + UUID .randomUUID ().toString ().replace ('-' , '_' );
626625 String tableCreate = "CREATE TABLE \" " + tableName + "\" " +
627626 " (id Int32, " +
628- " json JSON, json_default JSON DEFAULT '{\" a\" : 1}', " +
627+ " json JSON, json_default JSON DEFAULT '{\" a\" : 1}' " +
629628 " ) Engine = MergeTree ORDER BY id" ;
630629
630+ Map <String , Object > tmpMap = new HashMap <>();
631+ tmpMap .put ("a" , 1 );
632+
631633 // Insert random (valid) values
632634 Field [][] rows = new Field [][] {{
633635 new Field ("id" , 1 ), //Row ID
634- new Field ("json" , "{\" a\" : 1}" ).set ("{ \" a \" : 1}" ), new Field ("json_default" ).set ("{ \" a \" : 1}" ) //Json
636+ new Field ("json" , "{\" a\" : 1}" ).set (tmpMap ), new Field ("json_default" ).set (tmpMap ) //Json
635637 }};
636638
637639 writeTest (tableName , tableCreate , rows );
0 commit comments