Skip to content

feat: support Arrow accessors across column-enabled layers - #11103

Merged
ibgreen merged 11 commits into
masterfrom
codex/scatterplot-arrow-accessors
Nov 15, 2026
Merged

ibgreen merged 11 commits into
masterfrom
codex/scatterplot-arrow-accessors

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Goals

Response to TSC review comments

Allow Arrow columns through the existing accessors of column-enabled layers, with one public input choice per accessor: constant, callback, or Arrow vector.

Changes

  • Add a shared Arrow accessor type, opt-in validation, and column selection path that reuses the existing luma.gl conversions and layer column lifecycle.
  • Migrate Scatterplot, Arc, Line, PointCloud, Column/GridCell, Icon, SimpleMesh, and Scenegraph position, color, scalar, and supported vector accessors.
  • Migrate H3Hexagon, H3Cluster, S2, Quadkey, Geohash, and A5 identifier and style columns to their accessors, preserving source-feature styling and picking. Remove their separate CPU column props.
  • Restrict rendering column props to borrowed GPUVectors, mark them experimental, and omit them from public documentation. Accessors reject GPUVectors. Existing explicit GPU inputs override the corresponding accessor internally.
  • Document supported Arrow inputs in each prop description, linked to a shared guide for shapes, conversions, updates, and limitations.

Numeric rendering conversion continues to use luma.gl; CPU-expanded cell styling retains its existing 0–255 color convention. The rendering column path still excludes transitions and layer extensions.

Validation

  • yarn lint
  • yarn test-website, including the package build
  • Full Node suite: 142 tests passed
  • Eight affected-layer test files on WebGL: 42 passed, 33 WebGPU-only tests skipped
  • The same files on native Metal WebGPU: 75 passed
  • Focused TypeScript accessor contract checks

Work was isolated in a separate worktree; unrelated checkout changes were preserved.


Note

Medium Risk
Refactors prop validation, column resolution, and input handling across multiple primitive and composite layers. While consolidating the Arrow API into accessors simplifies usage, changes to column props could break callers relying on the earlier experimental column prop API.

Overview
Unifies Apache Arrow input handling by enabling column-supported layers to accept Arrow Vector instances directly through existing accessor props (such as getPosition, getFillColor, and getRadius) instead of requiring dedicated column props.

In the core lifecycle, AccessorPropType now supports an arrow opt-in flag to validate Arrow vectors via a new isArrowVector utility, and resolveColumns binds those vectors to layer column attributes alongside ArrowAccessor TypeScript types. For DGGS cell layers (A5Layer, GeohashLayer, H3HexagonLayer, H3ClusterLayer, QuadkeyLayer, and S2Layer), separate CPU column props like cells and fillColors have been removed in favor of passing Arrow vectors directly to cell identifier and styling accessors while preserving source-feature expansion and picking.

Explicit layer column props (positions, weights, etc.) are now strictly reserved for borrowed GPUVector instances, marked as @experimental, and documented under dedicated GPU buffer sections. Comprehensive documentation and guides across all affected core, mesh, and geo layers have been updated to reflect the new accessor conventions.

Reviewed by Cursor Bugbot for commit b804ca3. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues remain.

Summary

Adds Arrow vectors as inputs to supported layer accessors.

  • Scatterplot, Arc, Line, PointCloud, Column, and GridCell accessors can use Arrow vectors.
  • Icon, SimpleMesh, and Scenegraph accessors can take Arrow vectors.
  • Geo-cell layers take Arrow identifiers and styles through their accessors.

No new actionable issues found. Earlier findings were checked against the current fixes. Tests were not run during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Constants and callbacks] --> B[Supported accessors]
  C[Arrow vectors] --> B
  B --> D[Layer preparation]
  E[Borrowed GPUVectors] --> F[Experimental column props]
  F --> D
  D --> G[Rendering and picking]
Loading

Reviews (10) · Last reviewed commit: "docs: standardize GPUVector input sectio..." · Reviewed by Greptile

@coveralls

coveralls commented Nov 13, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 83.367% (+0.05%) from 83.317% — codex/scatterplot-arrow-accessors into master

@ibgreen ibgreen changed the title feat(layers): accept Arrow color and scalar accessors in ScatterplotLayer feat: support Arrow accessors across column-enabled layers Nov 13, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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 2041f59. Configure here.

@ibgreen
ibgreen force-pushed the codex/scatterplot-arrow-accessors branch from 6c3dc84 to 2baa0f4 Compare November 15, 2026 14:26
@ibgreen
ibgreen merged commit 525df0c into master Nov 15, 2026
7 checks passed
@ibgreen
ibgreen deleted the codex/scatterplot-arrow-accessors branch November 15, 2026 15:39
Columns need `COPY_SRC` usage. See the [constructor docs](./cpu-aggregator.md#readbackaggregator)
for accepted formats. Strided and interleaved columns work.

For Cartesian GridLayer inputs, compare the native WebGPU aggregator with the CPU adapter.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is this recipe covered elsewhere now, not supported after this change, or deemed unnecessary?

Same question for the section above

Comment on lines -173 to +196
#### `getPentagon` ([Accessor<bigint | string>](../../developer-guide/using-layers.md#accessors), optional) ![transition-enabled](https://img.shields.io/badge/transition-enabled-green.svg?style=flat-square") {#getpentagon}
#### `getPentagon` (Accessor | arrow.Vector, optional) ![transition-enabled](https://img.shields.io/badge/transition-enabled-green.svg?style=flat-square") {#getpentagon}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's keep the expected return types for callbacks

Comment on lines -194 to +217
#### `getHexagon` ([Accessor<string>](../../developer-guide/using-layers.md#accessors), optional) {#gethexagon}
#### `getHexagon` (Accessor | arrow.Vector, optional) {#gethexagon}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd also like the link to accessor docs to remain, in addition to the return types

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.

3 participants