rgbuilds commented on code in PR #25638:
URL: https://github.com/apache/datafusion/pull/25638#discussion_r4090493569
##########
datafusion-cli/src/main.rs:
##########
@@ -599,11 +599,11 @@ mod tests {
let rbs = df.collect().await?;
assert_snapshot!(batches_to_string(&rbs),@r#"
-
+-----------------------------------------------------------------+--------------+--------------------+-----------------------+-----------------+-----------+-------------+------------+----------------+------------+-----------+-----------+------------------+----------------------+-----------------+-----------------+--------------------+--------------------------+-------------------+------------------------+------------------+-----------------------+-------------------------+
- | filename |
row_group_id | row_group_num_rows | row_group_num_columns | row_group_bytes |
column_id | file_offset | num_values | path_in_schema | type | stats_min
| stats_max | stats_null_count | stats_distinct_count | stats_min_value |
stats_max_value | compression | encodings |
index_page_offset | dictionary_page_offset | data_page_offset |
total_compressed_size | total_uncompressed_size |
-
+-----------------------------------------------------------------+--------------+--------------------+-----------------------+-----------------+-----------+-------------+------------+----------------+------------+-----------+-----------+------------------+----------------------+-----------------+-----------------+--------------------+--------------------------+-------------------+------------------------+------------------+-----------------------+-------------------------+
- | ../parquet-testing/data/data_index_bloom_encoding_stats.parquet | 0
| 14 | 1 | 163 | 0
| 4 | 14 | "String" | BYTE_ARRAY | Hello |
today | 0 | | Hello | today
| GZIP(GzipLevel(6)) | [PLAIN, RLE, BIT_PACKED] | |
| 4 | 152 | 163
|
-
+-----------------------------------------------------------------+--------------+--------------------+-----------------------+-----------------+-----------+-------------+------------+----------------+------------+-----------+-----------+------------------+----------------------+-----------------+-----------------+--------------------+--------------------------+-------------------+------------------------+------------------+-----------------------+-------------------------+
+
+-----------------------------------------------------------------+--------------+--------------------+-----------------------+-----------------+-----------+-------------+------------+----------------+------------+-----------+-----------+------------------+----------------------+-----------------+-----------------+--------------------+--------------------------+-------------------+------------------------+------------------+-----------------------+-------------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+-----------------+-------------------+-----------------------+
+ | filename |
row_group_id | row_group_num_rows | row_group_num_columns | row_group_bytes |
column_id | file_offset | num_values | path_in_schema | type | stats_min
| stats_max | stats_null_count | stats_distinct_count | stats_min_value |
stats_max_value | compression | encodings |
index_page_offset | dictionary_page_offset | data_page_offset |
total_compressed_size | total_uncompressed_size | bloom_filter_offset |
bloom_filter_length | column_index_offset | column_index_length |
offset_index_offset | offset_index_length | sorting_columns | row_group_ordinal
| row_group_file_offset |
+
+-----------------------------------------------------------------+--------------+--------------------+-----------------------+-----------------+-----------+-------------+------------+----------------+------------+-----------+-----------+------------------+----------------------+-----------------+-----------------+--------------------+--------------------------+-------------------+------------------------+------------------+-----------------------+-------------------------+---------------------+---------------------+---------------------+---------------------+---------------------+---------------------+-----------------+-------------------+-----------------------+
+ | ../parquet-testing/data/data_index_bloom_encoding_stats.parquet | 0
| 14 | 1 | 163 | 0
| 4 | 14 | "String" | BYTE_ARRAY | Hello |
today | 0 | | Hello | today
| GZIP(GzipLevel(6)) | [PLAIN, RLE, BIT_PACKED] | |
| 4 | 152 | 163
| 192 | | 156 |
25 | 181 | 11 |
| 0 | 4 |
Review Comment:
The updated snapshots exercise several of the new footer fields
(`bloom_filter_offset=192`, column/offset index offset+length,
`row_group_ordinal`, `row_group_file_offset`), but `bloom_filter_length` and
`sorting_columns` stay NULL/empty in both fixtures. That is expected for
`data_index_bloom_encoding_stats.parquet` — `parquet-testing` documents it as
having Bloom/page-index metadata without `bloom_filter_length`.
Because both `Some` paths stay unobserved, a regression that always pushed
`None` for `bloom_filter_length` (lines 449–450) or `sorting_columns` (lines
457–458) would still pass.
`parquet-testing` already has fixtures for the missing cases:
- `data/data_index_bloom_encoding_with_length.parquet` — same file with
`bloom_filter_length` populated
- `data/sort_columns.parquet` — two row groups with writer-declared sorting
columns
Would it be useful to add a focused `SELECT`/snapshot against those files so
extraction of the length (`i32` → `i64`) and `format!("{cols:?}")` formatting
are actually locked in?
--
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]