RFC: arrow.Table support
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- data-visualization, frontend
Research direction
Start with the core Layer lifecycle and column preparation helpers, then trace the existing Arrow converter and column definitions for vectorized layers. The RFC divides the work into independently landable preparation PRs and later Table integration; choose a specific checklist item before changing code. Done means its listed compatibility, precedence, lifecycle, or consumer tests pass while existing behavior is preserved.
Written by the indexing model from the issue text.
Description
Proposal
Allow Arrow-equipped layers to accept an Apache Arrow Table through data. Resolve each supported plural column prop using this precedence:
- Explicit non-null Arrow column or GPUVector
- Compatible same-named column in the loaded
datatable - Existing binary attribute, accessor, and default fallback
Match exact public column names, such as positions, fillColors, and radii. Ignore incompatible table fields; reject invalid explicit inputs. Once a compatible field is selected, conversion errors (including unsupported null values) remain errors rather than silently falling back.
new ScatterplotLayer({
data: table,
fillColors: explicitColors,
getRadius: row => row.population / 1000
});
Here positions may come from table.positions; explicit fill colors win; compatible table.radii wins over getRadius.
Architecture
Keep selection separate from conversion and rendering. Add a small core resolver exposed through a protected Layer helper. Layers supply existing column definitions and specialized compatibility predicates. The resolver inspects schema metadata without GPU allocations, row materialization, prop mutation, registration, or caching.
Share numeric compatibility rules with the Arrow converter. Geometry, Bitmap mesh, and DGGS inputs retain their specialized contracts. Pass resolved inputs into existing preparation helpers, including column-mode detection; do not overwrite layer props. Preserve ownership, aligned chunks, picking, bounds, and existing extension/transition limitations.
Expand public data types to accept Table using type-only imports. Recognize tables structurally to support multiple installed Arrow copies.
Async behavior
Use Layer's existing async data lifecycle. Resolve columns from the loaded value after dataTransform, supporting direct tables, promised tables, and loader results. Retain previous valid rendering during replacement; commit converted resources atomically; discard stale loads/conversions. Include conversion in isLoaded while retaining existing onDataLoad semantics. Switching tables, schemas, or ordinary row data must correctly enter or leave column mode.
Automatic accumulation of async iterators yielding tables/record batches is deferred: the existing row-array concatenation path needs a separate Arrow accumulation contract.
Source and column queries
Proposed follow-up after table-backed column resolution lands. Both props use structured loaders.gl query objects.
queryrequests source-side pushdown through a query-capable loaders.gl source. Use it to reduce or shape what the source returns, for example by projecting fields or filtering records before transfer. A change toqueryreloads the source. Report unsupported source queries explicitly.columnQuerytransforms the loaded Arrow table afterdataTransformand before the layer resolves columns. Use it to compute or rename fields such aspositionsandradii, or to filter or reorder rows locally. A change tocolumnQueryreuses the loaded source and updates layer inputs.
The pipeline is source query → loaded data → dataTransform → columnQuery → column resolution. Explicit column props take precedence and must match the resulting rows in count and order. Accessor fallbacks, instance counts, and picking use the resulting table and its row order. props.data and onDataLoad refer to the loaded source data. isLoaded includes column query evaluation and GPU preparation.
Use the loaders.gl Arrow evaluator for the initial columnQuery backend. It can materialize rows depending on the operators. A future GPUDataFrame evaluator could implement the same layer-facing contract. GPU execution and streaming evaluation are follow-ups.
Independently landable prep PRs
Each PR should reference this RFC with Refs #<this issue> rather than closing it, include relevant TSDoc and developer/API documentation, and preserve existing behavior until the final integration.
- 1. Extract schema compatibility checks. Reuse allocation-free converter validation for scalar, position, color, and fixed-width numeric vectors. Document accepted schemas and schema-versus-value validation. Test supported widths, child types, and existing conversion errors.
- 2. Separate column selection from preparation. Introduce the internal core resolver and protected Layer boundary. Initially resolve explicit inputs only, keeping behavior unchanged. Document the selection contract; test explicit inputs and internal
prop: falseexclusions. - 3. Consume resolved inputs consistently. Adapt
LayerColumnsand existing instanced layers so initialization, model selection, conversion, and accessor fallback share the selected inputs. Document helper responsibilities. Preserve current explicit-column behavior with backend lifecycle tests. - 4. Harden async replacement lifecycle. Test/fix data-load and conversion races, failed replacement, finalization, empty results, first draw, and
isLoaded. Document callback/loading semantics. This improves existing explicit-column handling independently of table discovery. - 5. Add specialized resolver adapters. Reuse the selection boundary in Bitmap, mesh, DGGS, and Storage helpers, initially retaining explicit-input behavior. Document topology, cell schemas, and ownership constraints; test representative consumers.
Feature PRs after preparation
- 6. Enable Table fallback in standard vectorized layers. Add Table data typing, same-name compatible-field lookup, and accessor rows via
table.get(index). Add the shared Arrow guide, precedence examples, and per-layer links. Test direct/promised/transformed tables, explicit overrides, schema changes, chunks, and picking on WebGL/WebGPU. - 7. Enable specialized consumers. Apply table discovery to Bitmap, DGGS, and Storage inputs using their adapters. Document layer-specific requirements and test topology, per-feature styling/picking, and ownership.
Verification
Concentrate precedence and race coverage in core, with small smoke tests for each consumer and representative WebGL/WebGPU rendering/picking tests. Verify caller resources survive, failed replacements retain prior resources, and uniform-only updates do not re-upload geometry. Run relevant tests, yarn build, yarn lint, and yarn test-website for each applicable PR. Keep examples and existing golden images unchanged.
Scope decisions
No AttributeManager routing for typed inputs, new registration system, new barrel module, implicit GPU readback, mixed chunk structures, automatic seam handling, or relaxed topology contracts. Discuss any broader changes separately.
- Dominant language
- TypeScript
- Stars
- 14.8k
- Forks
- 2.3k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 230
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from visgl/deck.gl
-
[Bug] Tile3DLayer selects no tiles until the camera moves when tileset.json loads right after a layer updatePossibly taken @lee3Q claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
[Bug] SplitterWidget calls onDragStart on drag end; Deck._getViews writes into the app's views arrayPossibly taken @04jennet-coder claimed this 20 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
[Bug] WMSLayer positions EPSG:4326 images as CARTESIANPossibly taken @athomct claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
[Bug] MapLibreOverlay under React StrictMode: 'WebGL context already attached to device' because the attach path omits _reuseDevicesPossibly taken @jsve claimed this 84 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
visgl/deck.gl#10681 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
accessibility area:ci ci-test level:low priority:high type:test
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
skytuhua-org/Gen-V1#3132 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
drmrd/vernacular#1238 ·
Maintainers usually reply within 1 day
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
enhancement migration-prioritized
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Hudson-Pufferfish/local-party-console#136 ·
Maintainers usually reply within 1 day
-
priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day