You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org> on 2026/01/01 01:39:05 UTC
[PR] [python] light refactor for stats collect [paimon]
XiaoHongbo-Hope opened a new pull request, #6941:
URL: https://github.com/apache/paimon/pull/6941
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #xxx
<!-- What is the purpose of the change -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] light refactor for stats collect [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #6941:
URL: https://github.com/apache/paimon/pull/6941
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] light refactor for stats collect [paimon]
Posted by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org>.
XiaoHongbo-Hope closed pull request #6941: [python] light refactor for stats collect
URL: https://github.com/apache/paimon/pull/6941
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [python] light refactor for stats collect [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #6941:
URL: https://github.com/apache/paimon/pull/6941#discussion_r2656188017
##########
paimon-python/pypaimon/write/writer/data_writer.py:
##########
@@ -198,16 +198,14 @@ def _write_data_to_file(self, data: pa.Table):
field.name: self._get_column_stats(data, field.name)
for field in stats_fields
}
- data_fields = stats_fields if value_stats_enabled else []
- min_value_stats = [column_stats[field.name]['min_values'] for field in data_fields]
- max_value_stats = [column_stats[field.name]['max_values'] for field in data_fields]
- value_null_counts = [column_stats[field.name]['null_counts'] for field in data_fields]
key_fields = self.trimmed_primary_keys_fields
- min_key_stats = [column_stats[field.name]['min_values'] for field in key_fields]
- max_key_stats = [column_stats[field.name]['max_values'] for field in key_fields]
- key_null_counts = [column_stats[field.name]['null_counts'] for field in key_fields]
- if not all(count == 0 for count in key_null_counts):
+ key_stats = self._collect_value_stats(data, key_fields, column_stats)
+ if not all(count == 0 for count in key_stats.null_counts):
raise RuntimeError("Primary key should not be null")
+
+ data_fields = stats_fields if value_stats_enabled else []
+ value_stats = self._collect_value_stats(
Review Comment:
This will collect twice for key fields.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org