XiaoHongbo-Hope commented on code in PR #6976:
URL: https://github.com/apache/paimon/pull/6976#discussion_r2676633434
##########
paimon-python/pypaimon/tests/reader_base_test.py:
##########
@@ -813,6 +816,23 @@ def _test_value_stats_cols_case(self, manifest_manager,
table, value_stats_cols,
manifest_file_name = f"manifest-test-{test_name}"
manifest_manager.write(manifest_file_name, [entry])
+ if value_stats_cols is None:
+ from pathlib import Path
+ import fastavro
+ manifest_path = Path(table.table_path) / "manifest" /
manifest_file_name
+ with table.file_io.new_input_stream(str(manifest_path)) as f:
+ reader = fastavro.reader(f)
+ records = list(reader)
+ file_dict = records[0]['_FILE']
+ try:
+ if file_dict['_VALUE_STATS_COLS'] is None:
+ pass
Review Comment:
**Add an assertion to show that None COLS works well with code `if
file_dict['_VALUE_STATS_COLS'] is None`.** The root cause of the KeyError is
that very older version pypaimon (before
[205.09.10](https://github.com/apache/paimon/commit/b7d3e1a37)) . And double
checked user's test table is written before that by pypaimon.
In short, I suggest to discard this fix, as the root cause is bug during
writing, what's your suggestion?
--
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]