mapleFU commented on issue #15165:
URL: https://github.com/apache/arrow/issues/15165#issuecomment-1369859665
Maybe the code is
```rust
fn try_new(descr: &ColumnDescPtr, props: &WriterProperties) ->
Result<Self> {
let dict_supported = props.dictionary_enabled(descr.path())
&& has_dictionary_support(T::get_physical_type(), props);
let dict_encoder = dict_supported.then(||
DictEncoder::new(descr.clone()));
// Set either main encoder or fallback encoder.
let encoder = get_encoder(
props
.encoding(descr.path())
.unwrap_or_else(|| fallback_encoding(T::get_physical_type(),
props)),
)?;
let statistics_enabled = props.statistics_enabled(descr.path());
let bloom_filter = props
.bloom_filter_properties(descr.path())
.map(|props| Sbbf::new_with_ndv_fpp(props.ndv, props.fpp))
.transpose()?;
Ok(Self {
encoder,
dict_encoder,
descr: descr.clone(),
num_values: 0,
statistics_enabled,
bloom_filter,
min_value: None,
max_value: None,
})
}
```
Seems that it creates a `encoder` when build the writer
--
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]