Skip to content

fix(data): a GeoPackage's BLOB columns and a File Geodatabase's binary and extra geometry columns are said when left out (#2916) - #3093

Merged
Mavrick-F merged 2 commits into
opengeos:mainfrom
choupeanut:fix/2916-skipped-columns-notice
Nov 27, 2026
Merged

Mavrick-F merged 2 commits into
opengeos:mainfrom
choupeanut:fix/2916-skipped-columns-notice

Conversation

@choupeanut

@choupeanut choupeanut commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A GeoPackage table's BLOB columns (other than its geometry) and a File Geodatabase table's binary fields and geometry fields after the first were left out of the layer with no word, against the Never silent rule. Each reader now says it once per table, as FlatGeobuf and GeoParquet already do: "N column(s) of a type RustGIS has no field for was/were left out: photo (binary), ...", counting them and naming the first 12. The count and naming moved out of SourceInfo::note_columns into source::columns_note, so the File Geodatabase reader can use it; FlatGeobuf and GeoParquet say what they said.

  • GeoPackage: gpkg.rs (desktop) and gpkg_mem.rs (browser and uploads) say the same words. Read whole, the layer's name goes before the note, as for FlatGeobuf.
  • File Geodatabase: the note is put after the table's name (photos: 2 columns of types ... : scan (binary), Shape_2 (geometry)), because a note several layers share is said once (filegdb::read) and two tables with the same field would otherwise be taken for one.
  • A File Geodatabase raster field needed no change, although the issue lists it: a table with one is refused (Table::parse) and listed as not read, with GDAL offered, so nothing is dropped quietly. The Kind::Raster arm in the column loop is unreachable today; it names "raster" if the parser ever reads such a field.
  • Not changed: a GeoPackage column declared with a geometry type name (POINT, ...) other than the registered geometry column is read as a number or text, not left out. That is a different bug.

Surfaces: desktop, CLI, Python, MCP and the Assistant get the notice through the layer notices; the browser through gpkg_mem and filegdb::read (File Geodatabase folders open on the desktop only). No command, parameter, ribbon, plugin or project change; nothing to undo; no rows read or copied, only column names. The docs list (docs/user-guide/data-formats.md, the GeoPackage and File Geodatabase rows) says what is left out.

What is left for you: the issue asks for counted loss-code notices. These notices are counted, but plain, like the FlatGeobuf and GeoParquet ones, so rustgis-cli run --strict doesn't stop on them. I looked through the existing LossCodes and none says "a column RustGIS has no field type for was left out": dropped.value is for a value that didn't fit (its advice, "use a destination field that can hold it", doesn't apply to a column with no field type), dropped.extra-attributes for values beyond a layer's fields, dropped.feature and dropped.geometry for rows and shapes. A new code is a public identifier (docs/cli.md, never renamed), so I did not invent one: what to call it, and whether FlatGeobuf and GeoParquet should carry it too, is your choice. That is why this is "Part of #2916".

Testing

  • New filegdb::tests::binary_and_extra_geometry_fields_are_said_and_left_out (a binary field, a binary plus a second geometry field, 13 left-out fields, a clean table that says nothing, two tables with the same field each saying it) and source::tests::geopackage_blob_columns_are_said_and_left_out (desktop and browser readers say the same, 1, 2 and 13 BLOB columns, whole read prefixed with the layer name, the unaltered fixture says nothing). Both failed on the old code on the first assertion (left: []) and pass now.
  • cargo test -q -p rustgis-data (1899 passed, 70 integration, 1 doc), cargo clippy -q -p rustgis-data --all-targets -- -D warnings and cargo fmt --all --check clean.
  • Not run by me: cargo xtask ci, cargo xtask test-hygiene and the wasm build (the gate runs them).

UI evidence

No visible UI change (a notice's text only).

Related issue

Part of #2916 (the counted loss code the issue asks for is left to the maintainer; see the Summary)

Summary by CodeRabbit

  • Bug Fixes

    • Unsupported binary, raster, and additional geometry columns are now reported when omitted during data import. Supported attributes and the primary geometry remain available.
    • Notices identify up to 12 omitted columns and indicate how many more were excluded.
  • Documentation

    • Clarified that non-geometry BLOB columns in GeoPackage files are omitted and reported.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

GeoPackage and FileGDB readers now report unsupported columns that they omit. The notices include column names and kinds, with shared formatting that lists up to 12 columns and counts any additional columns.

Changes: Omitted-column reporting

Layer / File(s) Summary
GeoPackage omitted-column notices
crates/data/src/source/mod.rs, crates/data/src/source/gpkg.rs, crates/data/src/source/gpkg_mem.rs, crates/data/src/source/tests.rs, docs/user-guide/data-formats.md
GeoPackage readers record unsupported columns and add notices through SourceInfo. Shared formatting lists up to 12 column names and counts any remaining columns. Tests cover desktop and browser readers, and the documentation describes omitted BLOB columns.
FileGDB omitted-column notices
crates/data/src/filegdb.rs, crates/data/src/filegdb/tests.rs
FileGDB tables keep the first geometry field and report additional geometry fields, binary fields, and raster fields that are omitted. Tests check the notices, retained fields, and listing limit.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Possibly related issues

Suggested reviewers: mavrick-f, pick2510, giswqs

Merge Risk: Minimal · up to 0cb7d

This change adds notices when GeoPackage BLOB columns and File Geodatabase binary or extra geometry columns are left out of a layer. Data reading itself does not change. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: GeoPackage BLOB columns and File Geodatabase binary and extra geometry columns are now reported when left out. It matches the raw summary and objectives, which describ…
Description check Passed The description follows the template sections (Summary, Testing, UI evidence, Related issue). The Summary explains the change and rationale. Testing lists new tests and commands run, and notes CI step…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: GeoPackage BLOB columns and File Geodatabase binary and extra geometry columns are now reported when left out. It matches the raw summary and objectives, which describe notices for omitted columns. It is long (128 characters, 20 words) but specific and on topic.

Full details: Description check

Explanation

The description follows the template sections (Summary, Testing, UI evidence, Related issue). The Summary explains the change and rationale. Testing lists new tests and commands run, and notes CI steps not run. UI evidence states no visible UI change. Related issue says 'Part of #2916' and explains the open loss-code decision. It is thorough and matches the raw summary and objectives.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit reads the columns in a row,
“These fields are skipped, and now we know.”
Names up to twelve hop into view,
Extra ones get counted too.
The first shape stays; the notes now show.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: efb8fa07-85c8-4c8c-821e-08667be60293
Commits

Reviewing files that changed from the base of the PR and between 8de9552 and 0cb7d36.

Files selected for processing: 7

  • crates/data/src/filegdb.rs
  • crates/data/src/filegdb/tests.rs
  • crates/data/src/source/gpkg.rs
  • crates/data/src/source/gpkg_mem.rs
  • crates/data/src/source/mod.rs
  • crates/data/src/source/tests.rs
  • docs/user-guide/data-formats.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

&left_out,
["of a type RustGIS has no field for was left out", "of types RustGIS has no field for were left out"],
) {
report.messages.push(format!("{name}: {note}"));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The per-table naming is a reasonable way to keep two tables' notes apart, and the dedupe in read (line 183 onward) still works. But it means a geodatabase in which many feature classes each have a binary field gets one notice per table, up to 512 of them, each repeating the same kind of loss. The rule asks for one notice per kind with a count. Worth deciding before merge: either one note for the read that counts columns across tables and names the first 12 as table.field (kind), or keep one per table and say in the PR why the flood is acceptable. Not a data-loss issue, so it can wait for the quality pass if you prefer.

Category: quality

fields.push(Field::new(name, ty));
match field_type(&decl) {
Some(ty) => fields.push(Field::new(name, ty)),
None => left_out.push((name, "binary".to_string())),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The None arm labels every left-out column "binary". That is right today, because gpkg_blob::field_type returns None only for a BLOB declaration. But the label is now tied to that function's None meaning, and a later change that returns None for another reason would be reported as binary without anyone noticing. The same applies to gpkg_mem.rs:200. Small, optional fix: have field_type return the kind too, or add a comment at gpkg_blob::field_type saying that its None means "BLOB" and that the notes depend on it.

Category: quality

@github-actions

Copy link
Copy Markdown
Contributor

Code review

No bugs, security or performance issues found. The two findings below are quality points. I checked the diff against the base-branch rules and the read paths it touches. The reader changes are consistent, and the new tests cover both the lossy and clean cases.

Bugs: none found.

  • The GeoPackage path is covered on both readers: desktop gpkg.rs, which also serves open_bytes, and browser gpkg_mem.rs. Both share gpkg_blob::field_type, which returns None only for BLOB, so the geometry column and primary key are never reported as left out.
  • File Geodatabase: geometry_at moved above the loop and still picks the first geometry field, so row-value indexing and the columns mapping stay consistent.
  • Multiple layers' notes are de-duplicated by filegdb::read, and the table-name prefix keeps them distinct.

Security: none found.

Performance: none found. The only new allocation is the small left_out list.

Quality (both posted inline, low severity, neither blocks the change):

  • filegdb.rs:363: a geodatabase with many affected tables gets one notice per table, not one per kind with a count. The author's reason for per-table naming holds, but the trade-off should be decided before merge (confidence: medium).
  • gpkg.rs:301: the "binary" label is only correct because gpkg_blob::field_type returns None solely for BLOB. That coupling is undocumented, and gpkg_mem.rs:200 shares it (confidence: high that it is fragile, low that it is wrong today).

AGENTS.md: no breaks found.

  • Never silent: the left-out columns are reported with what, how many and where.
  • Surfaces: the browser path (gpkg_mem, filegdb::read) and the desktop path are both covered. The docs row for each format is updated.
  • No project format change, so no schema regeneration is needed. No fixtures in schema/ concern these formats.

Not raised, by the author's own note: the notices are plain notes, not LossCodes, so rustgis-cli run --strict does not stop on them. The PR says that is a maintainer decision for #2916.

Earlier review threads: none existed on this PR (prior-reviews.json is empty), so no concerns were left alone.

Checked, no change needed: the GDAL and DuckDB routes for these formats are not part of this change. gpkg/edit.rs also runs PRAGMA table_info, but it is a write path, so it is out of scope.

Change size

Compared with main (merge base 9bdf3a9 to PR head 0cb7d36), the whole PR.

Measure Value
Files changed 7 (0 added, 7 modified, 0 removed, 0 renamed)
Size before 702.0 KB
Size after 710.4 KB
Total size change +8.4 KB
Path Before After Change
crates/data/src/filegdb/tests.rs 48.8 KB 52.4 KB +3.6 KB
crates/data/src/source/tests.rs 307.1 KB 309.7 KB +2.4 KB
crates/data/src/filegdb.rs 52.2 KB 53.3 KB +1.1 KB
crates/data/src/source/gpkg_mem.rs 22.9 KB 23.3 KB +419 B
crates/data/src/source/gpkg.rs 79.6 KB 79.9 KB +369 B
docs/user-guide/data-formats.md 119.1 KB 119.2 KB +255 B
crates/data/src/source/mod.rs 72.4 KB 72.7 KB +237 B

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview

Commit 0cb7d36 from a fork built, but isn't published until a maintainer adds the preview label (once per commit).

@Mavrick-F
Mavrick-F added this pull request to the merge queue Nov 27, 2026
Merged via the queue into opengeos:main with commit 67800ac Nov 27, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants