JNSimba commented on code in PR #180: URL: https://github.com/apache/doris-spark-connector/pull/180#discussion_r1458246077
########## spark-doris-connector/src/main/java/org/apache/doris/spark/load/DorisStreamLoad.java: ########## @@ -505,4 +530,19 @@ private void handleStreamPassThrough() { } + /** + * compress data by gz compression algorithm + */ + private byte[] compressByGZ(String content) throws IOException{ + byte[] compressedData; + try(ByteArrayOutputStream baos = new ByteArrayOutputStream(); + GZIPOutputStream gzipOutputStream = new GZIPOutputStream(baos); + ){ + gzipOutputStream.write(content.getBytes("UTF-8")); + gzipOutputStream.finish(); + compressedData = baos.toByteArray(); + } + return compressedData; Review Comment: This method recommends adding a unit test -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org