Repository navigation
feat(data): say when a Parquet decimal column may be read rounded (#3539 part 2c) - #3638
Conversation
…engeos#3539 part 2c) A decimal stored as a 64-bit integer is read as a Double, which holds whole numbers exactly only up to 2^53. Tables and GeoParquet layers now name, in a ChangedRounded notice, the decimal columns whose values pass 2^53 in the column statistics, or may (no statistics, more than 15 digits). "fields" and nested STAC columns say it again for the columns read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
Part of #3539 (part 2c). Parts 2a (#3625) and 2b (#3630) read a Parquet table's chosen columns, locally and by web address. This part says when a decimal column may be read rounded, in a table and in a GeoParquet layer, as promised in round 4 of #3550.
What changes
ChangedRoundednotice when its values, before the decimal point is placed, go past 2^53 in a row group's statistics. It is also named when a row group has no statistics for it and its precision is over 15 digits. Example: "1 decimal column may be read rounded ('price'): a number field holds whole numbers exactly only up to 2^53 (9007199254740992), before the decimal point is placed".ParquetSource::new(GeoParquet layers: Add Data, uploads, downloads, by range) andParquetTable::new(tables)."fields"(ParquetTable::keep_fields) andParquetSource::with_columns(nested STAC columns) change the fields after the file opens, so they say it again for the columns read: a decimal column left out by"fields"is no longer named.data-formats.mdsays when the notice appears.Tests
decimals_a_number_field_may_round_are_said(data, table): one column past 2^53 by its statistics and one with no statistics and 18 digits are named. One within, one with no statistics and 12 digits, and a 32-bit decimal are not. With"fields", only the kept ones are named, and none when none is kept.geoparquet_decimals_past_2_53_are_said_to_be_read_rounded(data, GeoParquet): the same notice for a layer's attribute, and none for values within.cargo test -p rustgis-data -p rustgis-enginefor Parquet and decimals, clippy, fmt andcargo xtask test-hygienepass.Left for the next parts of #3539
memory::planned, and exact byte ranges for reads with"fields".layer.addDataBytes: put an uploaded table on the background read path.#3567 (export over a table's own source) was closed by #3582, whose check covers tables, Parquet ones included.
🤖 Generated with Claude Code
Summary by CodeRabbit