Skip to content

feat(layers): align Arrow vector and SQL accessors across tabular layers - #11219

Merged
ibgreen merged 5 commits into
masterfrom
codex/align-tabular-layer-inputs
Nov 19, 2026
Merged

ibgreen merged 5 commits into
masterfrom
codex/align-tabular-layer-inputs

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Background

Several tabular layers consume row callbacks but do not accept Arrow vectors or SQL accessors.

Change List

  • Adapt Arrow and SQL values for row accessor consumers
  • Enable path, polygon, trips, text, and icon accessors
  • Enable source accessors on five aggregation layers
  • Enable SimpleMeshLayer and ScenegraphLayer transform accessors
  • Render Arrow feature tables through GeoJsonLayer
  • Test populated, null, and typed empty data transitions
  • Documentation

Verified lint, affected package builds, and 14 Chromium layer tests.


Note

Medium Risk
Modifies core prop normalization, diffing, and sublayer propagation across numerous fundamental and aggregation layers to support Arrow and SQL inputs in row accessors.

Overview
Extends Apache Arrow vector and SQL query accessor support to row-oriented deck.gl layers across the core, layers, aggregation, mesh, and geo packages.

Introduces 'row' and 'row-color' Arrow accessor modes in component prop types. When given an Arrow column vector or SQL query, layers automatically wrap the input in an accessor callback via readAccessorValue to convert Arrow vectors into standard arrays or clamped color arrays. Column inputs are tracked via ROW_ACCESSOR_COLUMNS_SYMBOL to drive prop diffing and trigger sublayer updates in composite layers.

Enables row-based Arrow and SQL accessors across PathLayer, PolygonLayer, SolidPolygonLayer, TextLayer, IconLayer, TripsLayer, SimpleMeshLayer, ScenegraphLayer, and all aggregation layers. Additionally, updates GeoJsonLayer to directly accept Arrow tables with GeoArrow geometry fields.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T23:38:24.583236Z cda71d7 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cda71d7075

ℹ️ 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".

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issues were found.

Summary

Adds Arrow vector and SQL accessor support across row-based layers and lets GeoJsonLayer render GeoArrow tables.

  • Arrow columns and SQL results now feed row-based layer accessors.
  • Geometry, text, and icon layers accept Arrow and SQL accessor values.
  • Aggregation layers read their source values from Arrow and SQL accessors.
  • Mesh layers read per-row transforms from Arrow and SQL accessors.
  • GeoJsonLayer turns Arrow tables with GeoArrow geometry into features.

The four earlier findings remain addressed. No new issues found.

Reviews (5) · Last reviewed commit: "Type merged sublayer triggers" · Reviewed by Greptile

Comment thread modules/core/src/lib/composite-layer.ts Resolved
@coveralls

coveralls commented Nov 18, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.549% (+0.04%) from 82.51% — codex/align-tabular-layer-inputs into master

@ibgreen
ibgreen merged commit 77318f6 into master Nov 19, 2026
9 checks passed
@ibgreen
ibgreen deleted the codex/align-tabular-layer-inputs branch November 19, 2026 02:11

@chrisgervang chrisgervang left a comment

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.

Reviewed c4ccf77 after merge; follow-ups below.

One P1: the Arrow guide's units for color columns are wrong.

Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.


Generated by Claude Code

Comment on lines +204 to +207
These accessors use the same shapes and units as row callbacks. Supply the
source table alongside the accessors so the layer has a row count. Passing
`data: null` clears the layer and defers SQL evaluation. A zero-row Arrow
table retains its schema and draws no features.

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.

P1: "the same shapes and units as row callbacks" is wrong for colors. Without normalizedColors, a float column [1, 0, 0, 1] draws red, and a callback returning it draws near-black. Null cells are unexplained, while Limitations says Arrow columns must not contain nulls.

Could we use this wording?

Suggested change
These accessors use the same shapes and units as row callbacks. Supply the
source table alongside the accessors so the layer has a row count. Passing
`data: null` clears the layer and defers SQL evaluation. A zero-row Arrow
table retains its schema and draws no features.
These accessors read the same shapes as row callbacks. Color columns follow the
[Arrow color convention](#colors), and a null cell acts like a callback that
returns `null`. Supply the source table alongside the accessors so the layer has
a row count. Passing `data: null` clears the layer and defers SQL evaluation.
A zero-row Arrow table retains its schema and draws no features.

Generated by Claude Code

readAccessorValue(value.get(index), color)
);
}
return value;

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.

P2: Int64 cells reach row consumers as BigInt. A getWeight or getWidth column of Int64 falls back to the default value, and Int64 trip timestamps throw.

  • With apache-arrow 21.2.0, this returns 3n for an Int64 cell and [0n, 1n] for List<Int64>.
  • _normalizeValue treats a BigInt as missing, and a Float32Array write of one throws.

Could BigInt cells go through Number(), as the color branch does, with an Int64 test case?

Details
  • Parquet and DuckDB integer columns often load as Int64, and tableFromArrays makes Int64 from bigint values.
  • The tests build List<Float64> columns only. FixedSizeList cells and null cells read correctly in the same replay.

Generated by Claude Code

Object.keys(columns ?? {}).some(name => columns[name] !== oldColumns?.[name]) ||
Object.keys(oldColumns ?? {}).some(name => !columns?.[name])
) {
return 'An Arrow row accessor changed';

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.

P2: Swapping one row accessor vector counts as a data change, so every attribute rebuilds. A new getFillColor vector on a PolygonLayer re-tessellates every polygon.

  • Layer.updateState calls attributeManager.invalidateAll() for any data change reason.

Could a changed column invalidate only its own accessor, as an update trigger does?

Details
  • SQL resolution already sets dataChanged the same way (layer.ts:716). Not measured on a large table.

Generated by Claude Code

/** Decodes feature geometry while retaining the table's row order for styling and picking. */
function getArrowFeatures(data: Table): Feature[] {
/** First declared GeoArrow geometry field. */
const field = data.schema.fields.find(candidate => getGeoArrowFieldInfo(candidate)?.encoding);

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.

P2: GeoJsonLayer now takes an Arrow table but always decodes the first GeoArrow field. GeoArrowLayer from #11213 decodes the same inputs and takes getGeometry and geometryType. The data entry in geojson-layer.md does not list Arrow tables.

Should GeoJsonLayer take a geometry column prop like GeoArrowLayer? Could the data entry list the table input and link to Using with Arrow?


Generated by Claude Code

athomct pushed a commit to chesapeake-tech/deck.gl that referenced this pull request Nov 23, 2026
Resolve conflicts with the Arrow accessor and normalized color work on
master:

- text-layer.ts: keep TEXT_ALIGN from this branch and the color helpers
  from visgl#11164. Keep the 'arrow: row' default props from visgl#11219, and give
  getTextAlign and getLetterSpacing the same ArrowAccessor type and
  'arrow: row' default, like every other TextLayer accessor.
- text-layer.spec.ts: keep the letter spacing and alignment tests from
  this branch and the normalized color test from master.
- whats-new.md (no conflict): move the TextLayer entry into the v10
  Layers list. The automatic merge put it below the v10 separator.
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