MasslessParticle opened a new pull request, #489: URL: https://github.com/apache/arrow-go/pull/489
### Rationale for this change When dictionary encoding is enabled and and repetitions are set to `required`, the `null_count` statistic is negative because `defLevels` is always 0. ### What changes are included in this PR? This PR sets the null count to 0 if `defLevels - nonNullCount < 0` ### Are these changes tested? Yes. I've added a new test that exposes another bug. I started with the `fullTypeList` variable like [this test](https://github.com/apache/arrow-go/blob/c6ce2ef4e55009a786cf04b3845eba5170c98066/parquet/pqarrow/encode_dictionary_test.go#L43) and discovered that not all types are supported. If an unsupported type is encoded as a dictionary, it results in a nasty panic in the typed dictionary encoder because the types don't line up. ### Are there any user-facing changes? Yes, the stats written to parquet files are currently wrong for these sorts of columns. This PR should fix that! -- 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]
