Repository navigation
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ 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 54db90c. Configure here.
ibgreen
left a comment
There was a problem hiding this comment.
Verified the Chromium import blocker on the replacement PR against published math.gl 5.0.2.
| "@math.gl/tasks": "^5.0.0", | ||
| "@math.gl/core": "^5.0.2", | ||
| "@math.gl/geometry": "^5.0.2", | ||
| "@math.gl/geospatial": "^5.0.2", |
There was a problem hiding this comment.
Chromium shard 4 still fails before public-query.spec.ts collects tests: the ST_MAKEPOINT import reaches polygon-clipping, and Vite serves the raw UMD file without an ESM default export.
I reran the #4610 diagnosis with published math.gl 5.0.2 and Vite 8.3.5. With noDiscovery: true and a fresh cache, the baseline reproduces that error; adding only '@math.gl/geospatial > polygon-clipping' to the browser optimizeDeps.include makes the transformed import pass and ST_MAKEPOINT return the expected native GeoArrow point, even when the dependency is installed only under @math.gl/geospatial. Please add that entry next to the existing nested include and rerun this spec in Chromium. This verifies the isolated module path, not the full shard.
ibgreen
left a comment
There was a problem hiding this comment.
Shard 4 now passes all 20 public-query tests. The remaining shard 2 failure is a different Arrow fixture.
| ); | ||
| expect(toRows(grouped)).toHaveLength(1); | ||
| expect(toRows(grouped)[0].rows).toBe(2); | ||
| expect(toRows(grouped)[0].rows).toBe(2n); |
There was a problem hiding this comment.
Chromium shard 2 fails before this assertion: Arrow infers bare Uint8Array[] as Struct<{0:Float64, 1:Float64}>, not Binary. Could we use arrow.tableFromArrays for the grouped fixture and set bytes to arrow.vectorFromArray([new Uint8Array([1, 2]), new Uint8Array([1, 2])], new arrow.Binary())? I replayed the same date/bytes/null grouping in published math.gl 5.0.2 with Arrow 21.2.0: the original fixture throws, and explicit Binary returns one group with count 2n. That tests the supported binary key without changing the SQL executor.
|
Compared the complete diff and review feedback from #4610 (45911d6) against this PR (8a58e4a). All useful changes are accounted for here: upstream relational Arrow execution, native aggregate result types, boundary/regression tests, and upgrade guidance. This revision additionally removes obsolete predicate compatibility code and includes the polygon-clipping browser prebundle fix requested in the older review. The remaining differences deliberately use math.gl 5.0.2 and its validation/division semantics. No additional cherry-pick is needed. Closing #4610 as superseded; CI monitoring continues here. |
ibgreen
left a comment
There was a problem hiding this comment.
Shard 2 is fixed; shard 3 exposes a separate regression in the existing temporal predicate contract.
| : executeArrowQuery, | ||
| executeArrowQuery | ||
| ); | ||
| return planAndQueryArrowTable(source, options, executeArrowQuery, executeArrowQuery); |
There was a problem hiding this comment.
Chromium shard 3 fails three pre-existing temporal predicate cases. I replayed them through both the direct and streamed public wrappers with math.gl 5.0.2: DateDay equality with a noon Date incorrectly selects day zero; numeric 86_400_000 fails to select the next midnight; a numeric noon bound on TimestampMicrosecond throws Invalid temporal epoch value. The hosted test fails on the direct assertion before it reaches streaming, but both paths reproduce.
Can we retain a narrowly selected Date/Timestamp portable predicate path in both callers until a published math.gl fix preserves these millisecond semantics? The relational executor can still move to math.gl. Keep the existing result assertions, including the null row and streaming half.
I also validated that narrow fallback in a local build from this exact head: prefilter Date/Timestamp with the existing portable filter, then hand the remaining query to math.gl without where. All three cases passed direct, streamed and direct with orderBy. A separate streamed check preserved metadata on an initial empty batch and closed input at the global row limit. Full Chromium and the bundle budget still need rerunning.

Upgrade loaders.gl to math.gl ^5.0.2 from current master and remove duplicate Arrow SQL execution.
Lint, lockfile validation, and the 404 KiB scan bundle budget passed locally. GitHub CI runs the tests.
Supersedes draft #4610.
Note
Medium Risk
Alters Arrow query execution and return types (notably changing
COUNTtobigintand throwing on division by zero), which could impact consumers expecting legacy output formats.Overview
Upgrades
@math.glworkspace dependencies to^5.0.2and delegates Arrow SQL relational operations—including grouping, ordering, aggregates, expressions, and unions—directly tomath.gl.Removes custom JavaScript fallback execution and predicate compatibility layers from table and streaming batch query workflows. Relational queries now adopt upstream Arrow behavior:
COUNTaggregates returnInt64(bigint) values, empty ungrouped aggregates yield a single row with null metric values, and division by zero throws a SQL evaluation error.Reviewed by Cursor Bugbot for commit 8a58e4a. Bugbot is set up for automated code reviews on this repo. Configure here.