Rich-T-kid commented on code in PR #10654:
URL: https://github.com/apache/arrow-rs/pull/10654#discussion_r3839129373
##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -1112,6 +1117,32 @@ impl ArrowColumnWriter {
}
fn write_internal(&mut self, levels: &ArrayLevels) -> Result<()> {
+ if let Some(seen) = &mut self.distinct_values_seen {
+ let array = levels.array();
+ let non_null = levels.non_null_indices();
+ match array.as_any_dictionary_opt() {
+ Some(dict) => {
+ // For dictionary arrays, hash the integer keys rather
than the actual values.
+ // Key cardinality equals value cardinality, so
distinct-value counting stays
+ // correct while avoiding the cost of hashing
arbitrary-length values.
Review Comment:
not worth it
--
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]