Skip to content

Upgrade math.gl to 5.0.1 - #4610

Closed
ibgreen wants to merge 3 commits into
masterfrom
codex/math-gl-5.0.1
Closed

ibgreen wants to merge 3 commits into
masterfrom
codex/math-gl-5.0.1

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Upgrade loaders.gl to math.gl 5.0.1 before the loaders.gl 5.0.0 release.

  • Raise direct math.gl dependency ranges to ^5.0.1 in packages, examples, and the website.
  • Regenerate the Yarn lockfile and resolve all seven direct math.gl dependencies at 5.0.1.

All seven versions are available on npm. Yarn install, lint, and lockfile validation passed locally. GitHub CI will run the tests.


Note

Medium Risk
Replaces loaders.gl's in-memory row-based relational query evaluation with math.gl's SQL executor, which could surface subtle behavioral differences or type discrepancies in Arrow table queries.

Overview
Upgrades all @math.gl/* dependencies from ^5.0.0 to ^5.0.1 across core modules, apps, website, and examples, updating the lockfile accordingly.

In modules/core, refactors queryArrowTable to delegate relational query operations—such as scalar expressions, unions, groupings, and aggregates—directly to @math.gl/sql instead of materializing Arrow tables into JavaScript rows. Removes the legacy in-memory row evaluation, sorting, and aggregation helpers, and updates error expectation patterns in tests to align with math.gl's SQL engine messages.

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 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-23T02:24:38.871953Z 578d85a 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.

@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 1 potential issue.

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 573ae64. Configure here.

options: ArrowQueryOptions
): string[] {
const expressionNames = new Set((options.expressions || []).map(expression => expression.name));
const aggregateNames = new Set((options.aggregates || []).map(aggregate => aggregate.name));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Integer sums stay Arrow Int64

Medium Severity

The compatibility pass recasts only COUNT from the SQL executor’s Int64 to a JS number. math.gl also returns Int64 for integer SUM, so those aggregates now surface as bigint or string values instead of the portable numeric results callers previously received.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 573ae64. Configure here.

@ibgreen ibgreen left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A focused follow-up for the Chromium import failure on this revision.

Comment thread modules/core/package.json
"@math.gl/tasks": "^5.0.0",
"@math.gl/core": "^5.0.1",
"@math.gl/geometry": "^5.0.1",
"@math.gl/geospatial": "^5.0.1",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chromium shard 4 fails before public-query.spec.ts collects any tests. Its ST_MAKEPOINT import reaches polygon-clipping through @math.gl/geospatial/st-functions; with discovery disabled, Vite serves the raw UMD file, which has no ESM default export.

I reproduced the same failure with Vite 8.3.5 and math.gl 5.0.1 using Vite’s transformed client modules. With a fresh cache, adding only '@math.gl/geospatial > polygon-clipping' to the browser optimizeDeps.include switched the import to prebundled ESM and made the ST_MAKEPOINT import pass. Could we add that next to the existing nested include in vitest.config.ts and rerun this spec in Chromium? The isolated module check passed; it was not a full browser run.

@ibgreen

ibgreen commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator Author

Salvaged into #4611. I compared all changed files and review feedback against #4611 at 8a58e4a: the relational execution refactor, native Arrow aggregate types, regression tests, and migration notes are already present there. The Chromium polygon-clipping prebundle review fix is also included. Remaining differences are intentional updates for math.gl 5.0.2, so no extra cherry-pick was necessary.

@ibgreen ibgreen closed this Nov 23, 2026
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.

1 participant