jackylee-ch opened a new pull request, #10111:
URL: https://github.com/apache/paimon/pull/10111

   ### Purpose
   
   The `$files` system table renders `min_value_stats` and `max_value_stats` as 
`{}` for every file, even when the manifest carries per-column value stats.
   
   `_render_stats_map` reads the row via `getattr(row, "values", [])`, but on 
the read path the min/max rows are `BinaryRow` (built in 
`manifest_file_manager.py`), which has `get_field`/`__len__` and no `values` 
attribute — so `getattr` yields `[]` and the map renders empty.
   
   A `_row_values` helper falls back to `get_field(i)` when `values` is absent, 
used for the two value-stats maps. `min_key`/`max_key` are `GenericRow` (which 
has `values`), so `_render_key` is unchanged.
   
   ### Tests
   
   `files_table_test.test_value_stats_render_actual_values` writes rows with 
`metadata.stats-mode=full` and asserts the maps carry real values (min id 1, 
max id 3). Fails on master (`{}`), passes here.
   
   Written with Claude Code; verification is mine.
   


-- 
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]

Reply via email to