Skip to main content

Overview

From v10Experimental API

Apache Arrow conversion is available through optional subpaths of the published luma.gl packages. Install apache-arrow alongside the packages whose adapters you use. The generic package roots remain usable without Apache Arrow. The graph package installs its required @math.gl/geospatial dependency for GeoArrow conversion automatically.

yarn add @luma.gl/graph @luma.gl/engine apache-arrow
ImportResponsibilities
@luma.gl/graph/arrowPrimitive Arrow inspection, colors, matrix and temporal conversion, GPU data/vector upload, and vector readback.
@luma.gl/graph/arrowRecord batches, GPU tables, analytical table ingestion/readback, input schemas, GeoArrow adaptation, and DGGS preparation.
@luma.gl/engine/arrowGeometry and picking adapters, path/polygon/text preparation and rendering facades, and Gaussian splat conversion.
import {makeGPUVectorFromArrow} from '@luma.gl/graph/arrow';
import {makeGPUTableFromArrowTable} from '@luma.gl/graph/arrow';
import {makeGPUGeometryFromArrow} from '@luma.gl/engine/arrow';

The standalone private Arrow workspace package has been removed. These entries retain the existing conversion and renderer behavior; they do not introduce a new graph execution model. Application renderers can consume converted GPU vectors and geometries without depending on Arrow themselves.

GitHub
0s

Arrow Rendering​

These live examples exercise luma.gl's Arrow path, polygon, and text conversion and rendering stack through temporary deck.gl integration layers. They demonstrate progressive RecordBatch streaming, direct columnar inputs, constant and column styling, attribute rendering, and WebGPU storage rendering.

GitHub
0s

API Reference​

Choose a column representation​

Scalar and fixed-size-list columns can map to vertex attributes. Variable-length lists need a model-specific conversion or storage path. See Supported Arrow types for the support matrix and Arrow conversion for path, color, matrix, and temporal conversion helpers.

GPU Table Interop​

The optional Arrow adapters convert Apache Arrow objects into primitive @luma.gl/graph/gpu-data objects and higher-level @luma.gl/graph/gpu-tables objects:

  • makeGPUDataFromArrowData() uploads one Arrow Data chunk into a GPUData.
  • makeGPUVectorFromArrow() uploads one Arrow Vector into a GPUVector.
  • convertArrowColumnToGPUVector() converts numeric and color columns for rendering, optionally applying a row transform and returning validity and residual-low vectors. Its result owns the uploaded buffers; call destroy() when finished.
  • makeGPURecordBatchFromArrowRecordBatch() uploads one Arrow RecordBatch.
  • makeGPUTableFromArrowTable() uploads one Arrow Table while preserving source record batch boundaries.
  • makeGPUAnalyticsTableFromArrowTable() uploads renderer-independent numeric and dictionary columns into existing GPU tables while preserving source batches, validity masks, and category metadata for GPU dataframe execution.
  • makeArrowTableFromGPUAnalyticsTable() explicitly reads a GPU analytical result back into Arrow, reconstructing nullable numeric/dictionary columns and either preserved per-batch selection or explicitly requested global ordering. Combined with GPUSQLContext from the separate @luma.gl/graph/gpu-sql subpath, this provides an Arrow input → GPU dataframe execution → Arrow output workflow without adding Apache Arrow to generic table or SQL packages.
  • makeGPUSplatDataFromArrow() prepares independently owned Gaussian splat batches for @luma.gl/engine/splats, decoding GraphDECO encodings without clamping or quantizing spherical-harmonic DC radiance.
  • makeGPUSplatDataFromArrowStream() progressively prepares Gaussian splat batches without concatenating Arrow tables or rebuilding previously uploaded GPU buffers. Both Gaussian conversion helpers accept structurally compatible Arrow objects from other installed Arrow versions, including those produced by loaders.gl 5 alpha.
  • ArrowInputSchema combines source resolution and conversion with final GPUInputSchema validation for model-specific prepared inputs.

The resulting table schema is GPUSchema, and each vector has a GPUVector.format memory-layout string such as float32x3, unorm8x4, or vertex-list<float32x3>. Arrow DataType metadata may still be retained by adapter/readback paths. Apache Arrow is an optional peer of the three owning packages and is loaded only by their Arrow entries. @luma.gl/graph/arrow does not import graph or engine; @luma.gl/graph/arrow does not import engine.

Ownership and streaming​

The move preserves source chunks, record batches, nullability, and source-row metadata. Upload helpers retain their existing ownership rules: converted data owns its uploaded buffers, borrowed chunks remain borrowed, and destroying aggregate vectors must not destroy borrowed data. Streaming adapters append independent batches; packing or merging remains an explicit caller decision. Readback remains asynchronous and explicit. GPUVector.format describes stored GPU bytes; Arrow type metadata supports conversion and readback rather than replacing the GPU format.