[ 
https://issues.apache.org/jira/browse/AVRO-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17874046#comment-17874046
 ] 

ASF subversion and git services commented on AVRO-4032:
-------------------------------------------------------

Commit 9379fdb9f5ca27887dfe67daac137176811f2b82 in avro's branch 
refs/heads/main from MarcoLugo
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=9379fdb9f ]

AVRO-4032: [Rust] Make it possible to set custom compression level for all 
codec that support it (#3095)

* AVRO-4032: add zstd variant that allows for level config

* add docs

* manual impl for IntoStaticStr to handle 2 variants with same value

* AVRO-4032: [Rust] Add codec settings for Bzip2

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* AVRO-4032: [Rust] Add settings for Xz codec

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* add zstd settings

* make our new settings structs visible

* AVRO-4032: [Rust] Add support for Zstandard dictionary

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* AVRO-4032: [Rust] Store the codec compression_level in the header metadata

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* AVRO-4032: [Rust] Minor cleanups

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* AVRO-4032: Fix the build

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

* AVRO-4032: Add tests for Codec::Null and ::Deflate

This way there is no need to enable other codecs when running unrelated tests.
Otherwise the build fails with:
```
error: function `avro_4032_codec_settings` is never used
  --> avro/tests/codecs.rs:50:4
   |
50 | fn avro_4032_codec_settings(codec: Codec) -> TestResult {
   |    ^^^^^^^^^^^^^^^^^^^^^^^^
```

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>

---------

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Co-authored-by: Martin Tzvetanov Grigorov <[email protected]>

> It'd be great to be able to set the zstd compression level to something other 
> than the default
> ----------------------------------------------------------------------------------------------
>
>                 Key: AVRO-4032
>                 URL: https://issues.apache.org/jira/browse/AVRO-4032
>             Project: Apache Avro
>          Issue Type: Wish
>          Components: rust
>            Reporter: Marco Lugo
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> Zstd level is always the default (i.e. 3). This is great for most cases but 
> it'd be very convenient to be able to set a different level.
>  
> I was thinking that maybe the enum 
> [here|https://docs.rs/apache-avro/latest/apache_avro/enum.Codec.html] could 
> have another variant, something like `Zstandard(u8)` or even 
> `Zstandard(ZstdLevel)` where ZstdLevel is an enum. Then if `Zstandard` is 
> used it uses the default and if this newly proposed one is is used it takes 
> into consideration the provided level. I lack context so there may be a good 
> reason not to accept a different level or maybe a different way to do it.
>  
> If there's a preferred way of doing this, I am willing to open a PR with the 
> changes.
>  
> Thank you,
> Marco



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to