[
https://issues.apache.org/jira/browse/PARQUET-2351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17769844#comment-17769844
]
ASF GitHub Bot commented on PARQUET-2351:
-----------------------------------------
amousavigourabi opened a new pull request, #1157:
URL: https://github.com/apache/parquet-mr/pull/1157
Make sure you have checked _all_ steps below.
### Jira
- [x] My PR addresses the following [Parquet
Jira](https://issues.apache.org/jira/browse/PARQUET/) issues and references
them in the PR title. For example, "PARQUET-1234: My Parquet PR"
- https://issues.apache.org/jira/browse/PARQUET-XXX
- In case you are adding a dependency, check if the license complies with
the [ASF 3rd Party License
Policy](https://www.apache.org/legal/resolved.html#category-x).
### Tests
- [x] My PR adds the following unit tests __OR__ does not need testing for
this extremely good reason:
Parameterizes existing fixture to instantiate writer options using
Configuration instead.
### Commits
- [x] My commits all reference Jira issues in their subject lines. In
addition, my commits follow the guidelines from "[How to write a good git
commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Documentation
- [ ] In case of new functionality, my PR adds documentation that describes
how to use it.
- All the public functions and the classes in the PR contain Javadoc that
explain what it does
---
The functionality is implemented in a way in which options set using the
`builder.withXXX(...)` method will _always_ override the options passed by the
configuration. This is done in order to not make things break in unexpected
ways. Having a configuration which used to not have any effect on these options
override an explicit option would be a bit odd after all.
> ParquetWriter/ParquetReader should parse options directly from supplied
> Configuration
> -------------------------------------------------------------------------------------
>
> Key: PARQUET-2351
> URL: https://issues.apache.org/jira/browse/PARQUET-2351
> Project: Parquet
> Issue Type: Improvement
> Reporter: Claire McGinty
> Priority: Minor
>
> As a Parquet user, my expectation is that ParquetWriter/ParquetReader will
> automatically parse any options passed in the supplied Configuration. For
> example:
>
> ```
> Configuration conf = new Configuration();
> conf.setBoolean(ParquetOutputFormat.BLOOM_FILTER_ENABLED, true);
> ParquetWriter<Car> writer = AvroParquetWriter.<Car>builder(path)
> .withSchema(Car.SCHEMA$)
> .withConf(conf)
> .build();
> ```
>
> However, the above code results in a ParquetWriter where `bloomFilterEnabled`
> is set to false-the expected way to configure this is to use
> `ParquetWriter#withBloomFilterEnabled` directly.
>
> IMO, when `ParquetWriter#withConf` is invoked, it should also delegate to
> `encodingPropsBuilder` and set any Configured properties.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)