mapleFU commented on code in PR #35989:
URL: https://github.com/apache/arrow/pull/35989#discussion_r1232972393
##########
cpp/src/parquet/column_writer.cc:
##########
@@ -1346,7 +1346,12 @@ class TypedColumnWriterImpl : public ColumnWriterImpl,
public TypedColumnWriter<
EncodedStatistics GetChunkStatistics() override {
EncodedStatistics result;
- if (chunk_statistics_) result = chunk_statistics_->Encode();
+ if (chunk_statistics_) {
+ if (has_dictionary_ && !fallback_) {
+
chunk_statistics_->SetDistinctCount(current_dict_encoder_->num_entries());
Review Comment:
@pitrou I think this is the proper way to set distinct count. Another method
is
```c++
if (chunk_statistics_) {
result = chunk_statistics_->Encode();
if (has_dictionary_ && !fallback_) {
result.set_distinct_count(...);
}
}
```
Do you think this is ok?
--
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]