perf: bypass query plans for JSON reads - #3314
Draft
chiinlquah wants to merge 1 commit into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3314 +/- ##
=======================================
Coverage 90.34% 90.34%
=======================================
Files 250 250
Lines 89131 89172 +41
Branches 89131 89172 +41
=======================================
+ Hits 80524 80563 +39
- Misses 5672 5673 +1
- Partials 2935 2936 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What changes are proposed in this pull request?
Read JSON files in
PlanBasedJsonHandlerthrough the typedReadBytesI/O operation and decodethe returned bytes directly with Arrow JSON. This avoids constructing and executing a generic
single-node query plan for JSON scans while preserving the generic query-plan path for other plan
shapes.
The Arrow JSON byte decoder is shared with
SyncJsonHandler. A focused test wraps the planexecutor and rejects
QueryPlanoperations, proving that JSON reads take only the typed I/O path.In a local CommitRange benchmark over 1,000 one-action commit files (50 warmups, 10 measured
iterations, release/O3 native build), the median fell from 3.616 s with generic driver-local plan
execution to 0.788 s with direct JSON, a 4.59x speedup. Both variants launched zero Spark jobs.
The remaining cost includes three scans per commit in the benchmarked CommitRange call path.
How was this change tested?
cargo test -p delta_kernel --features declarative-plans engine::plans::json::tests::test_read_json_files