Repository navigation
feat(proposals): support spatial SQL geometry accessors - #11278
Conversation
a09210b to
5fd3a6b
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5fd3a6b04b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5fd3a6b. Configure here.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
cc5defc to
2f58bdf
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
chrisgervang
left a comment
There was a problem hiding this comment.
Reviewed 2f58bdf after merge; follow-ups below.
No P1s.
Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.
Generated by Claude Code
| protected hasAccessorQuery(name: string): boolean { | ||
| return Boolean(this.props[ACCESSOR_QUERIES_SYMBOL]?.[name]); | ||
| } | ||
|
|
||
| /** Returns the current row-aligned SQL accessor results with their Arrow field metadata. */ | ||
| protected getAccessorQueryTable() { |
There was a problem hiding this comment.
P2: These add two protected methods to Layer in @deck.gl/core without an underscore. Only the private proposals layer uses them, but every Layer subclass sees them in the published types, so a later rename breaks subclasses.
- The nearby experimental SQL helper is
_getResolvedColorScales(layer.ts:772). core/layer.mddocuments neither method.
Could we follow up by renaming them _hasAccessorQuery and _getAccessorQueryTable?
Generated by Claude Code
| const geometry = resolveGeoArrowGeometry( | ||
| geometryData, | ||
| computedGeometry?.name ?? columnName, | ||
| props.geometryType |
There was a problem hiding this comment.
Non-blocking: geometryType also overrides the SQL result's encoding. With geometryType: 'geoarrow.polygon' and ST_Centroid, the WKB result goes to the native polygon renderer (resolve-geoarrow-geometry.ts:46).
Could geometryType apply only to the source column?
Generated by Claude Code
| /** Geometry column. Defaults to the declared primary geometry or first GeoArrow field. */ | ||
| getGeometry?: string; | ||
| getGeometry?: string | {readonly sql: string}; |
There was a problem hiding this comment.
Non-blocking: The TSDoc still describes only a column name.
| /** Geometry column. Defaults to the declared primary geometry or first GeoArrow field. */ | |
| getGeometry?: string; | |
| getGeometry?: string | {readonly sql: string}; | |
| /** Geometry column, or a SQL accessor such as `{sql: 'ST_Centroid(geometry)'}`. Defaults to the declared primary geometry or first GeoArrow field. */ | |
| getGeometry?: string | {readonly sql: string}; |
Generated by Claude Code
| @@ -0,0 +1,6 @@ | |||
| # GeoArrow spatial SQL | |||
There was a problem hiding this comment.
Non-blocking: (Outside the diff: examples-v10/proposals/README.md:38) The Examples list there does not include geoarrow-sql. This line is fine.
Could we add - [geoarrow-sql](./geoarrow-sql/) to that list?
Generated by Claude Code

Follow-up to #11277
Change List
GeoArrowLayerVerified 19 Node tests and two Chromium backend cases.
Note
Low Risk
Low risk. Changes primarily expand experimental proposal layers and preserve metadata on SQL accessor results without impacting existing core rendering pathways.
Overview
Adds support for evaluating SQL expressions in
GeoArrowLayer'sgetGeometryprop, enabling rendering of derived geometries (such asST_Centroid,ST_PointOnSurface, orST_Envelope) while maintaining source-row picking and styling.Arrow accessor query evaluation now preserves field extension metadata across column expressions and batch results.
LayerintroduceshasAccessorQueryandgetAccessorQueryTablehelpers so layers can access computed query columns, andGeoArrowLayerintegrates computed geometry tables with source attributes for native rendering and GeoJSON fallbacks. An interactive example, documentation, and test coverage across WebGL and WebGPU are also included.Reviewed by Cursor Bugbot for commit 2f58bdf. Bugbot is set up for automated code reviews on this repo. Configure here.