DonnyZone commented on a change in pull request #1865: [CALCITE-3648] MySQL UNCOMPRESS function support URL: https://github.com/apache/calcite/pull/1865#discussion_r398296250
########## File path: core/src/main/java/org/apache/calcite/runtime/CompressionFunctions.java ########## @@ -62,4 +65,21 @@ public static ByteString compress(String data) { } } + /** + * MySql Decompression is based on zlib. + * <a href="https://docs.oracle.com/javase/8/docs/api/java/util/zip/Inflater.html">Inflater</a> + * is used to implement decompression. + */ + public static String uncompress(ByteString data) { + try { + if (data == null || data.length() == 0) { Review comment: For `data.length==0`, is it possible to be an empty string? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services