fix: WIP address export issues - #3664
Open
igorDykhta wants to merge 1 commit into
Open
Conversation
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves geometry export/re-import behavior by adding safer serialization for GeoArrow cells and by detecting GeoJSON geometry strings during field type inference, with accompanying Node test coverage.
Changes:
- Add
formatGeoArrowValueto serialize GeoArrow/WKB cells into re-importable strings (prefer WKT/GeoJSON, fallback to hex). - Add
isGeoJsonGeometryStringand integrate it intogetFieldsFromDataso GeoJSON-in-CSV columns classify as geometry. - Extend Node tests to cover GeoJSON-geometry-string detection and GeoArrow CSV roundtripping.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/node/utils/dataset-utils-test.js | Adds unit tests for isGeoJsonGeometryString and fixes t.end() placement for isHexWkb test. |
| test/node/utils/data-utils-test.js | Adds tests ensuring GeoArrow cells format to strings and parseFieldValue uses the GeoArrow formatter. |
| test/node/utils/data-processor-test.js | Adds tests for GeoJSON-in-geometry column detection and GeoArrow→CSV→reimport roundtrip. |
| src/utils/src/data-utils.ts | Implements formatGeoArrowValue and wires it into FIELD_DISPLAY_FORMAT for geoarrow fields. |
| src/processors/src/data-processor.ts | Adds Arrow field classification logging helper invoked from arrowSchemaToFields. |
| src/common-utils/src/data.ts | Introduces isGeoJsonGeometryString for recognizing GeoJSON geometry/feature JSON strings. |
| src/common-utils/src/data-type.ts | Uses isGeoJsonGeometryString during type inference to classify GeoJSON strings as geometry. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+579
to
+582
|
|
||
| logAddedGeometryFields(fields); | ||
| return fields; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.