Skip to content

feat(examples v10): infer position precision with SQL ARRAY - #11266

Merged
ibgreen merged 1 commit into
masterfrom
codex/v10-infer-array-precision
Nov 21, 2026
Merged

ibgreen merged 1 commit into
masterfrom
codex/v10-infer-array-precision

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Background

The v10 examples can infer coordinate precision from numeric Arrow columns.

Change List

  • Pack numeric coordinates with SQL ARRAY[...]
  • Preserve CSV string casts
  • Render tests

Verified with lint, WebGL and WebGPU picking tests, and coordinate comparisons on six example datasets.


Note

Low Risk
The changes are confined to example applications and new test coverage, with no changes to core library runtime code.

Overview
Updates v10 example applications to use standard SQL ARRAY[...] constructor syntax instead of ARRAY_FLOAT64(...) for position and target/source position accessors. This allows coordinate precision to be inferred directly from the underlying Arrow column types rather than explicitly casting to float64.

Also adds Vitest coverage for ScatterplotLayer verifying SQL ARRAY[...] position evaluation on WebGL and WebGPU with both Float32Array and Float64Array buffers.

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

@greptile-apps greptile-apps 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 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-21T12:23:17.576562Z d28bb79 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.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 82.437% (+0.003%) from 82.434% — codex/v10-infer-array-precision into master

@ibgreen
ibgreen merged commit 7380322 into master Nov 21, 2026
9 checks passed
@ibgreen
ibgreen deleted the codex/v10-infer-array-precision branch November 21, 2026 12:39

@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 d28bb79 after merge; follow-ups below. No P1s.

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


Generated by Claude Code

data: AIRPORTS,
loaders: [JSONTableLoader],
getPosition: {sql: 'ARRAY_FLOAT64(longitude, latitude)'},
getPosition: {sql: 'ARRAY[longitude, latitude]'},

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: (Outside the diff: docs/api-reference/core/layer.md:377) The examples now teach ARRAY[longitude, latitude], but docs/api-reference/core/layer.md:377 on master still shows FLOAT64x2(longitude, latitude), and website/src/doc-demos/widgets.js:584 uses ARRAY_FLOAT64(x, y). The precision rule this PR relies on is not documented either: with math.gl rc.2, integer-only inputs give Float64 and otherwise the widest float input wins. Could layer.md show ARRAY[...] and state that rule?


Generated by Claude Code

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