fix: WIP collapse Arrow record batches above configurable cap - #3663
Open
igorDykhta wants to merge 7 commits into
Open
fix: WIP collapse Arrow record batches above configurable cap#3663igorDykhta wants to merge 7 commits into
igorDykhta wants to merge 7 commits into
Conversation
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses deck.gl picking limitations and GeoArrow coordinate robustness by collapsing excessive Arrow record batches into fewer chunks and by making polygon filtering tolerant of non-finite altitude values (z) while still validating lng/lat.
Changes:
- Added
compactArrowTableand integrated it into Arrow ingestion paths (processors, DuckDB table, ArrowDataContainer) to reduce record-batch explosion that can break picking. - Updated polygon filtering to only require finite lng/lat (ignoring non-finite altitude) and added tests for that behavior.
- Improved GeoArrow point coordinate extraction and reduced GeoArrow-derived layer proliferation by building single-batch vectors / binary collections.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/node/utils/filter-utils-test.js | Adds regression coverage for polygon filtering with null/undefined altitude. |
| test/node/utils/data-container-test.js | Adds coverage for Arrow batch compaction and ArrowDataContainer chunk behavior. |
| src/utils/src/index.ts | Exposes compactArrowTable from @kepler.gl/utils. |
| src/utils/src/filter-utils.ts | Relaxes polygon filtering to only require finite lng/lat; refactors coordinate checks. |
| src/utils/src/arrow-data-container.ts | Implements compactArrowTable and applies it in ArrowDataContainer construction/update. |
| src/utils/src/application-config.ts | Introduces maxArrowBatches application config and default value. |
| src/processors/src/data-processor.ts | Compacts Arrow tables during batch processing. |
| src/layers/src/point-layer/point-layer.ts | Uses shared GeoArrow point coordinate reader for robustness. |
| src/layers/src/layer-utils.ts | Adds getGeoArrowPointCoords; collapses WKB conversions and point vector batching. |
| src/layers/src/heatmap-layer/heatmap-layer.ts | Uses shared GeoArrow point coordinate reader for robustness. |
| src/layers/src/geojson-layer/geojson-layer.ts | Adjusts incremental update handling to account for compacted tables / row-growth. |
| src/duckdb/src/table/duckdb-table.ts | Compacts DuckDB Arrow results before deriving fields/columns. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
added 6 commits
August 23, 2026 18:29
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
Signed-off-by: Ihor Dykhta <ihordykhta@Ihors-MacBook-Pro.local>
lixun910
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
maxArrowBatches(default 255).initApplicationConfig({ maxArrowBatches }).Fewer batches avoid several problems that show up on large parquet/DuckDB tables:
JS loaders do not expose a way to control the record-batch size they produce, so collapsing after load is the option to alleviate these issues.
Memory: compaction copies the table, so peak memory is higher during processing. If that is a problem for a given dataset, raise
maxArrowBatches(a very large value skips collapse):Test plan
maxArrowBatches: 0always collapses, and a very large value never collapses.