Introduce Instructions for the Backend to use during execution#21479
Conversation
PR Reviewer Guide 🔍(Review updated until commit 25543f8)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 25543f8 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 67652b2
Suggestions up to commit 59dedaf
Suggestions up to commit a9d018c
Suggestions up to commit d160c87
Suggestions up to commit 2974120
|
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 25543f8.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
|
Persistent review updated to latest commit cd356ae |
|
❌ Gradle check result for cd356ae: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Persistent review updated to latest commit 9c52685 |
9c52685 to
a2b744a
Compare
|
Persistent review updated to latest commit a2b744a |
|
❌ Gradle check result for a2b744a: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
a2b744a to
2974120
Compare
|
Persistent review updated to latest commit 2974120 |
|
❌ Gradle check result for 2974120: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Persistent review updated to latest commit d160c87 |
d160c87 to
e9f0237
Compare
|
Persistent review updated to latest commit a9d018c |
|
❌ Gradle check result for a9d018c: Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Persistent review updated to latest commit 59dedaf |
sandeshkr419
left a comment
There was a problem hiding this comment.
Thanks for working on this. The abstraction LGTM with a few nit-picks: happy to pick them up myself while implementing in my follow-up PR #21457 as well if they make more sense.
|
❌ Gradle check result for 59dedaf: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
Persistent review updated to latest commit 67652b2 |
Signed-off-by: expani <anijainc@amazon.com>
Signed-off-by: expani <anijainc@amazon.com>
Signed-off-by: expani <anijainc@amazon.com>
Signed-off-by: expani <anijainc@amazon.com>
Signed-off-by: expani <anijainc@amazon.com>
Signed-off-by: expani <anijainc@amazon.com>
67652b2 to
25543f8
Compare
|
Persistent review updated to latest commit 25543f8 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21479 +/- ##
============================================
- Coverage 73.41% 73.38% -0.03%
+ Complexity 74424 74401 -23
============================================
Files 5970 5970
Lines 338261 338261
Branches 48752 48752
============================================
- Hits 248323 248246 -77
- Misses 70205 70227 +22
- Partials 19733 19788 +55 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Backend Execution Metadata Framework
Replaces the opaque data-node execution flow with a chained instruction-based system. The planner now produces typed, ordered instructions per stage that tell the backend how to configure its execution environment before running the query.
Why:
The old flow bundled SessionContext creation, table registration, and query execution into one indivisible call. This made it hard to inject work between steps — like registering UDFs for filter delegation or configuring optimizer settings for partial aggregates without making backends COMPLEX.
What it does:
The planner analyzes the query shape and produces instructions like "set up a shard scan", "configure filter delegation", or "prepare for final aggregation". These travel with the plan to the execution site. At execution time, each instruction's handler runs in order, composably building up the native execution environment. Only after all handlers have run does the query execute against the fully-configured environment.
For the Rust/DataFusion side, the previous execute_query is decomposed into create_session_context → register_table_provider → execute_with_context, each callable independently via FFM. This lets Java instruction handlers configure the SessionContext incrementally.
What this enables next: Filter delegation (Core bridges Lucene and DataFusion without either knowing about the other), partial aggregate optimizer configuration, and any future execution concern — all as additional instruction handlers without touching existing code.