alamb commented on code in PR #10608:
URL: https://github.com/apache/datafusion/pull/10608#discussion_r1608873185
##########
datafusion/core/tests/parquet/arrow_statistics.rs:
##########
@@ -73,6 +73,22 @@ pub fn parquet_file_one_column(
no_null_values_start: i64,
no_null_values_end: i64,
row_per_group: usize,
+) -> ParquetRecordBatchReaderBuilder<File> {
+ parquet_file_one_column_stats(
+ num_null,
+ no_null_values_start,
+ no_null_values_end,
+ row_per_group,
+ EnabledStatistics::Chunk,
+ )
+}
+
+pub fn parquet_file_one_column_stats(
Review Comment:
Can we please add some doc comments about what this function does / how it
is different? It is clear from this PR that it adds `enable_stats` but that
might not be obvious in the future
While we are on this topic, I personally find a struct with named parameters
easier to read than something the following where you have to look up
`parquet_file_one_column_stats` to know what the `0`, `4` and `7` mean.
```rust
let reader =
parquet_file_one_column_stats(0, 4, 7, row_per_group,
EnabledStatistics::None);
```
I wonder if we could change the code to something like this to make it
easier to read 🤔
```rust
let reader = TestFile {
num_null: 0
no_null_values_start: 4,
no_null_values_end: 7,
row_per_group,
enable_stats: EnabledStatistic::None,
}
.build();
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]