Skip to content

Review fixes for #56 - #58

Merged
m-mohr merged 12 commits into
merge-fixesfrom
merge-fixes-review
Sep 28, 2026
Merged

m-mohr merged 12 commits into
merge-fixesfrom
merge-fixes-review

Conversation

@ivorbosloper

@ivorbosloper ivorbosloper commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Code for the review findings on #56, one commit per finding, so they can be picked individually.

  • 1: the in-memory merge merges the collections first and hydrates only the keys the merged collection drops (hydrate_from_collection takes keys), so shared array constants stay in the collection.
  • 2: write_query gets a strict flag that vec merge turns off: a missing required value is a warning instead of an error with converter advice, and empty geometries are kept, as in memory. Converters and merge_parquet keep the checks. The per-collection null condition no longer repeats the collection check.
  • 3: _constants_table only catches conversion errors and warns with the property and its type.
  • 4: Schemas.add_all rejects two versions of one schema in a collection, like core versions.
  • 5: the id check and suffixing use the (collection, id) key only with more than one collection.
  • 6: the in-memory merge takes excludes and resolves them on the data it loaded; only the DuckDB path lists properties, from the GeoParquet schemas.
  • 7: the null condition quotes with _sql_name.
  • 8: find_differing_crs in vecorel.util replaces the CRS loops of _common_crs and get_duckdb_blocker.
  • 9: warn_missing_required only skips collection-only properties that the merged collection still carries.
  • 10: get_collection_id returns None instead of raising; both merges leave such rows as they are.
  • The last commit adds CHANGELOG entries for the user-facing fixes.

🤖 Generated with Claude Code

ivorbosloper and others added 11 commits September 26, 2026 23:22
The in-memory merge hydrated every constant and relied on the dehydration
on write to move them back, which fails for arrays and objects. It now
merges the collections first and hydrates only the keys the merged
collection drops, as merge_parquet does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vec merge only appends datasets, so the DuckDB engine no longer applies the
converter checks there: a missing required value is reported with a
merge-appropriate warning instead of an error with converter advice, and
empty geometries are kept, as the in-memory merge does. This is a new
strict flag on write_query that vec merge turns off; converters and
merge_parquet itself keep the checks. The per-collection null condition
no longer repeats the collection check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
_constants_table caught every exception and fell back to an inferred type
silently. It now only catches the conversion errors and warns with the
property and its type; a schema without a pyarrow type still falls back
without a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
add_all only rejected conflicting core versions; two versions of the same
extension (e.g. fiboa v0.2.0 and v0.3.0) in one collection were kept side
by side. Schemas that only differ in their version segment are now
rejected the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The id uniqueness check and the suffixing used a (collection, id) key
whenever there is a collection column, which slows down the common
single-collection conversion for nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With --exclude, every dataset without a cheap property listing (e.g.
GeoJSON) was read in full to get its columns and then read again by the
merge. The in-memory merge now takes the excludes and resolves them on the
data it has loaded; the DuckDB path still lists the GeoParquet columns,
which only reads the schema. A merge without the collection no longer
adds it back or needs it for the duplicate check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
get_duckdb_blocker re-implemented the loop of DuckDBBaseConverter._common_crs
with its private helpers. Both now use find_differing_crs from vecorel.util.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eview #9)

warn_missing_required skipped every collection-only property, but
merge_collections drops those that are not in the included properties, so
a required one disappeared without a warning. Only the ones the merged
collection still carries are skipped now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
get_collection_id raised for rows without a collection when the metadata
doesn't name one, so create-geoparquet and the in-memory merge failed on
input they used to accept, while merge_parquet caught it in one place
only. It now returns None and both merges leave such rows as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@m-mohr

m-mohr commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Thanks for the check. With regards to the points, I have a hard time understanding them from the issue so will have to look at the commits. Will probably take me a bit...

All commits and the PR text refer to issues, but I think these are not the issues that are actually relevant here. It seems Claude just slopped # in front of all numbers without being aware of GitHub. Removed it from the text, but not from the commits.

@m-mohr
m-mohr marked this pull request as ready for review September 28, 2026 09:37
@m-mohr

m-mohr commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Generally looks good. I think it might be worthwhile to add a strict/non-strict mode to vec merge, which both could be useful depending on the usecase. Will create a separate PR that stack on top of this.

@m-mohr
m-mohr added this pull request to stack #57 September 28, 2026 11:21
@m-mohr
m-mohr removed this pull request from stack #57 September 28, 2026 11:39
* Add strict mode to vec merge, minor improvements and bug fixes

* Fix typed constants, missing geometries, nested nulls and schema map in merge
@m-mohr
m-mohr merged commit 8c75e56 into merge-fixes Sep 28, 2026
@m-mohr
m-mohr deleted the merge-fixes-review branch September 28, 2026 11:41
@m-mohr m-mohr mentioned this pull request Sep 28, 2026
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