Skip to content

Commit a61da1e

Browse files
authored
Show row_counts also for (FixedLen)ByteArray (#3573)
1 parent 9bb6aaf commit a61da1e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

parquet/src/bin/parquet-index.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,11 @@ impl Args {
103103
Index::INT96(v) => print_index(&v.indexes, offset_index, &row_counts)?,
104104
Index::FLOAT(v) => print_index(&v.indexes, offset_index, &row_counts)?,
105105
Index::DOUBLE(v) => print_index(&v.indexes, offset_index, &row_counts)?,
106-
Index::BYTE_ARRAY(_) => println!("BYTE_ARRAY not supported"),
107-
Index::FIXED_LEN_BYTE_ARRAY(_) => {
108-
println!("FIXED_LEN_BYTE_ARRAY not supported")
106+
Index::BYTE_ARRAY(v) => {
107+
print_index(&v.indexes, offset_index, &row_counts)?
108+
}
109+
Index::FIXED_LEN_BYTE_ARRAY(v) => {
110+
print_index(&v.indexes, offset_index, &row_counts)?
109111
}
110112
}
111113
}
@@ -130,7 +132,7 @@ fn compute_row_counts(offset_index: &[PageLocation], rows: i64) -> Vec<i64> {
130132
}
131133

132134
/// Prints index information for a single column chunk
133-
fn print_index<T: std::fmt::Display>(
135+
fn print_index<T: std::fmt::Debug>(
134136
column_index: &[PageIndex<T>],
135137
offset_index: &[PageLocation],
136138
row_counts: &[i64],
@@ -154,12 +156,12 @@ fn print_index<T: std::fmt::Display>(
154156
idx, o.offset, o.compressed_page_size, row_count
155157
);
156158
match &c.min {
157-
Some(m) => print!(", min {:>10}", m),
159+
Some(m) => print!(", min {:>10?}", m),
158160
None => print!(", min {:>10}", "NONE"),
159161
}
160162

161163
match &c.max {
162-
Some(m) => print!(", max {:>10}", m),
164+
Some(m) => print!(", max {:>10?}", m),
163165
None => print!(", max {:>10}", "NONE"),
164166
}
165167
println!()

0 commit comments

Comments
 (0)