hongzhi-gao commented on code in PR #648:
URL: https://github.com/apache/tsfile/pull/648#discussion_r2576364933
##########
cpp/src/compress/compressor_factory.h:
##########
@@ -46,19 +58,35 @@ class CompressorFactory {
if (type == common::UNCOMPRESSED) {
ALLOC_AND_RETURN_COMPRESSPR(UncompressedCompressor);
} else if (type == common::SNAPPY) {
+#ifdef ENABLE_SNAPPY
ALLOC_AND_RETURN_COMPRESSPR(SnappyCompressor);
+#else
+ ALLOC_AND_RETURN_COMPRESSPR(UncompressedCompressor);
+#endif
} else if (type == common::GZIP) {
+#ifdef ENABLE_GZIP
ALLOC_AND_RETURN_COMPRESSPR(GZIPCompressor);
+#else
+ ALLOC_AND_RETURN_COMPRESSPR(UncompressedCompressor);
+#endif
} else if (type == common::LZO) {
+#ifdef ENABLE_LZOKAY
ALLOC_AND_RETURN_COMPRESSPR(LZOCompressor);
+#else
+ ALLOC_AND_RETURN_COMPRESSPR(UncompressedCompressor);
+#endif
+ } else if (type == common::LZ4) {
+#ifdef ENABLE_LZ4
+ ALLOC_AND_RETURN_COMPRESSPR(LZ4Compressor);
+#else
+ ALLOC_AND_RETURN_COMPRESSPR(UncompressedCompressor);
+#endif
Review Comment:
fix. Return nullptr if not exists
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]