wgtmac commented on code in PR #35886:
URL: https://github.com/apache/arrow/pull/35886#discussion_r1219789164


##########
cpp/src/arrow/util/compression.h:
##########
@@ -124,7 +168,15 @@ class ARROW_EXPORT Codec {
 
   /// \brief Create a codec for the given compression algorithm
   static Result<std::unique_ptr<Codec>> Create(
-      Compression::type codec, int compression_level = 
kUseDefaultCompressionLevel);
+      Compression::type codec,
+      const std::shared_ptr<CodecOptions>& codec_options =
+          std::make_shared<CodecOptions>(kUseDefaultCompressionLevel));
+
+  /// \brief Create a codec for the given compression algorithm
+  /// \deprecated and left for backwards compatibility.
+  ARROW_DEPRECATED("Use CodecOptions to create Codec")

Review Comment:
   Sounds reasonable. I was thinking it is always preferable to use the new 
`CodecOptions` to set the level. 



-- 
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]

Reply via email to