Skip to content

Support SQL color scales in Arrow accessors - #11159

Merged
ibgreen merged 4 commits into
masterfrom
codex/sql-color-scales
Nov 19, 2026
Merged

ibgreen merged 4 commits into
masterfrom
codex/sql-color-scales

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Background

Arrow color accessors need to resolve SQL color scales over the loaded table.

Change List

  • Resolve top-level color scales with math.gl
  • Honor custom SQL parsers and function declarations
  • Reuse ordinary accessor batches when data appends
  • Unit tests
  • Documentation

Verified workspace build, lint, and focused accessor tests.


Note

Low Risk
Adds additive SQL color scale parsing and evaluation for Arrow accessors without modifying core rendering pipelines. Non-scale SQL accessors maintain their existing evaluation behavior.

Overview
Adds support for top-level SQL color scale functions (SCALE_COLOR, SCALE_DIVERGING, SCALE_ORDINAL, SCALE_QUANTILE, and SCALE_QUANTIZE) within Arrow SQL accessor expressions using @math.gl/sql/scales.

Color scales resolve their domains over the entire loaded Arrow table. When data is appended, non-scale accessor columns preserve previous batch results while color scale columns are re-evaluated across all batches to reflect updated domains. Missing or null values fall back to transparent colors.

Also updates evaluateAccessorQueries to return both the evaluated table and resolved scales metadata, adjusts internal call sites, and documents SQL color scale usage.

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

@coveralls

coveralls commented Nov 17, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.545% (+0.02%) from 82.521% — codex/sql-color-scales into master

@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 9478920; comments only at this point. Three P1s: scale expressions skip custom SQL parsers and functions, getResolvedScale needs settling, and the PR mixes in unrelated work. Scale resolution itself is sound.

P1: Scenegraph Arrow transforms, a WebGPU depthFormat workaround, deckgl.ts size rounding and three example rewrites are unrelated to color scales. Could these move to their own PRs?

P2: whats-new.md announces Scenegraph transforms but not SQL color scales.

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


Generated by Claude Code

Comment thread modules/core/src/lib/layer.ts Resolved
Comment thread docs/api-reference/core/layer.md Resolved
@ibgreen ibgreen mentioned this pull request Nov 18, 2026
14 of 70 tasks
@ibgreen
ibgreen force-pushed the codex/sql-color-scales branch from 9478920 to a5d5282 Compare November 18, 2026 16:12
@ibgreen
ibgreen changed the base branch from codex/luma-alpha16 to master November 18, 2026 16:12
@ibgreen
ibgreen force-pushed the codex/sql-color-scales branch from fd843fb to 9419c73 Compare November 18, 2026 16:31
@ibgreen ibgreen changed the title feat(core): resolve SQL color scales for Arrow accessors Support SQL color scales in Arrow accessors Nov 18, 2026
@ibgreen
ibgreen force-pushed the codex/sql-color-scales branch from 9419c73 to 18e2f61 Compare November 18, 2026 21:23
@ibgreen
ibgreen marked this pull request as ready for review November 18, 2026 21:33
@ibgreen
ibgreen enabled auto-merge November 18, 2026 21:33
@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-18T21:35:07.069703Z 18e2f61 Draft marked ready
ℹ️ 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: 18e2f61e3e

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

@ibgreen
ibgreen added this pull request to the merge queue Nov 18, 2026
@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 based on this follow-up review.

Summary

Adds SQL color scales to Arrow accessors, with domains drawn from the whole loaded table and colors refreshed when data appends.

  • Arrow-backed layer accessors can use SQL color scales over loaded data.

Reviews (4) · Last reviewed commit: "Document SQL accessor batch evaluation" · Reviewed by Greptile

@ibgreen
ibgreen removed this pull request from the merge queue due to a manual request Nov 18, 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 2 potential issues.

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 fef418c. Configure here.

@ibgreen
ibgreen added this pull request to the merge queue Nov 19, 2026
Merged via the queue into master with commit 2d20e80 Nov 19, 2026
9 checks passed
@ibgreen
ibgreen deleted the codex/sql-color-scales branch November 19, 2026 13:45
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