Skip to content

feat: introduce materialized execution mode - #4158

Merged
aglinxinyuan merged 42 commits into
mainfrom
xinyuan-stage-by-stage
Jan 24, 2026
Merged

aglinxinyuan merged 42 commits into
mainfrom
xinyuan-stage-by-stage

Conversation

@aglinxinyuan

@aglinxinyuan aglinxinyuan commented Jan 14, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

We are introducing a materialized execution mode alongside the existing pipelined execution mode.

To support this, a new workflow setting called execution mode has been added, along with a corresponding backend flag. Materialized and pipelined execution are treated as the same level and are represented as an enum in the configuration.

We also introduce a flag named defaultExecutionMode, whose value is set to pipelined.

Execution Mode Demo
Pipelined Pipelined
Materialized Materialized

Any related issues, documentation, discussions?

This PR resolves issue #4157.

How was this PR tested?

Tested with the existing test cases and test cases added for MATERIALIZED ExecutionMode:

  • Execution Tests (DataProcessingSpec.scala): Added 10 test cases verifying that workflows with various operator combinations (CSV/JSONL sources, filters, aggregations, joins) execute correctly in MATERIALIZED mode and produce the same results as PIPELINED mode.
  • Region Tests (CostBasedScheduleGeneratorSpec.scala): Added 5 test cases verifying that CostBasedScheduleGenerator correctly creates one region per operator in MATERIALIZED mode, with assertions confirming: (1) only 1 state explored, (2) number of regions equals number of operators, (3) each region contains exactly 1 operator, and (4) all physical links become materialized region boundaries.

Was this PR authored or co-authored using generative AI tooling?

No.

@aglinxinyuan aglinxinyuan self-assigned this Jan 14, 2026
@aglinxinyuan aglinxinyuan added backend Anything related to backend services gui labels Jan 14, 2026
@github-actions github-actions Bot added engine frontend Changes related to the frontend GUI common labels Jan 14, 2026
@aglinxinyuan aglinxinyuan changed the title Xinyuan stage by stage feat: introduce batch execution mode Jan 14, 2026
@aglinxinyuan
aglinxinyuan marked this pull request as draft January 14, 2026 05:25
@aglinxinyuan

Copy link
Copy Markdown
Contributor Author

I will mark this PR ready after adding test cases.

@aglinxinyuan aglinxinyuan linked an issue Jan 14, 2026 that may be closed by this pull request
@aglinxinyuan aglinxinyuan changed the title feat: introduce batch execution mode feat: introduce materialized execution mode Jan 18, 2026
@aglinxinyuan
aglinxinyuan marked this pull request as ready for review January 22, 2026 01:25

@Xiao-zhen-Liu Xiao-zhen-Liu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good in general. Left a few comments.

@aglinxinyuan
aglinxinyuan dismissed Yicong-Huang’s stale review January 24, 2026 02:15

Comments are addressed.

@aglinxinyuan
aglinxinyuan merged commit 850fd85 into main Jan 24, 2026
10 checks passed
@aglinxinyuan
aglinxinyuan deleted the xinyuan-stage-by-stage branch January 24, 2026 02:15
madisonmlin pushed a commit to madisonmlin/texera that referenced this pull request Mar 10, 2026
### What changes were proposed in this PR?
We are introducing a materialized execution mode alongside the existing
pipelined execution mode.

To support this, a new workflow setting called execution mode has been
added, along with a corresponding backend flag. Materialized and
pipelined execution are treated as the same level and are represented as
an enum in the configuration.

We also introduce a flag named `defaultExecutionMode`, whose value is
set to `pipelined`.

| Execution Mode | Demo |
| ------------- | ------------- |
| Pipelined
|![Pipelined](https://github.com/user-attachments/assets/f4d23d97-7e79-4214-b7d2-ed48391acf8a)
|
| Materialized |
![Materialized](https://github.com/user-attachments/assets/14dfdf8e-1a07-445e-8f4f-0085f3783104)|

### Any related issues, documentation, discussions?
This PR resolves issue apache#4157.

### How was this PR tested?
Tested with the existing test cases and test cases added for
MATERIALIZED ExecutionMode:

- Execution Tests (`DataProcessingSpec.scala`): Added 10 test cases
verifying that workflows with various operator combinations (CSV/JSONL
sources, filters, aggregations, joins) execute correctly in MATERIALIZED
mode and produce the same results as PIPELINED mode.
- Region Tests (`CostBasedScheduleGeneratorSpec.scala`): Added 5 test
cases verifying that CostBasedScheduleGenerator correctly creates one
region per operator in MATERIALIZED mode, with assertions confirming:
(1) only 1 state explored, (2) number of regions equals number of
operators, (3) each region contains exactly 1 operator, and (4) all
physical links become materialized region boundaries.

### Was this PR authored or co-authored using generative AI tooling?
No.
bobbai00 added a commit to bobbai00/texera that referenced this pull request Apr 22, 2026
- agent-chat: drop stale third arg to reloadWorkflow (signature was
  trimmed by 7254fca but this call site was missed)
- agent-registration: set executionMode in default WorkflowSettings
  (now required after apache#4158 merged from main)

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
### What changes were proposed in this PR?
We are introducing a materialized execution mode alongside the existing
pipelined execution mode.

To support this, a new workflow setting called execution mode has been
added, along with a corresponding backend flag. Materialized and
pipelined execution are treated as the same level and are represented as
an enum in the configuration.

We also introduce a flag named `defaultExecutionMode`, whose value is
set to `pipelined`.

| Execution Mode | Demo |
| ------------- | ------------- |
| Pipelined
|![Pipelined](https://github.com/user-attachments/assets/f4d23d97-7e79-4214-b7d2-ed48391acf8a)
|
| Materialized |
![Materialized](https://github.com/user-attachments/assets/14dfdf8e-1a07-445e-8f4f-0085f3783104)|

### Any related issues, documentation, discussions?
This PR resolves issue apache#4157.

### How was this PR tested?
Tested with the existing test cases and test cases added for
MATERIALIZED ExecutionMode:

- Execution Tests (`DataProcessingSpec.scala`): Added 10 test cases
verifying that workflows with various operator combinations (CSV/JSONL
sources, filters, aggregations, joins) execute correctly in MATERIALIZED
mode and produce the same results as PIPELINED mode.
- Region Tests (`CostBasedScheduleGeneratorSpec.scala`): Added 5 test
cases verifying that CostBasedScheduleGenerator correctly creates one
region per operator in MATERIALIZED mode, with assertions confirming:
(1) only 1 state explored, (2) number of regions equals number of
operators, (3) each region contains exactly 1 operator, and (4) all
physical links become materialized region boundaries.

### Was this PR authored or co-authored using generative AI tooling?
No.
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
### What changes were proposed in this PR?
We are introducing a materialized execution mode alongside the existing
pipelined execution mode.

To support this, a new workflow setting called execution mode has been
added, along with a corresponding backend flag. Materialized and
pipelined execution are treated as the same level and are represented as
an enum in the configuration.

We also introduce a flag named `defaultExecutionMode`, whose value is
set to `pipelined`.

| Execution Mode | Demo |
| ------------- | ------------- |
| Pipelined
|![Pipelined](https://github.com/user-attachments/assets/f4d23d97-7e79-4214-b7d2-ed48391acf8a)
|
| Materialized |
![Materialized](https://github.com/user-attachments/assets/14dfdf8e-1a07-445e-8f4f-0085f3783104)|

### Any related issues, documentation, discussions?
This PR resolves issue apache#4157.

### How was this PR tested?
Tested with the existing test cases and test cases added for
MATERIALIZED ExecutionMode:

- Execution Tests (`DataProcessingSpec.scala`): Added 10 test cases
verifying that workflows with various operator combinations (CSV/JSONL
sources, filters, aggregations, joins) execute correctly in MATERIALIZED
mode and produce the same results as PIPELINED mode.
- Region Tests (`CostBasedScheduleGeneratorSpec.scala`): Added 5 test
cases verifying that CostBasedScheduleGenerator correctly creates one
region per operator in MATERIALIZED mode, with assertions confirming:
(1) only 1 state explored, (2) number of regions equals number of
operators, (3) each region contains exactly 1 operator, and (4) all
physical links become materialized region boundaries.

### Was this PR authored or co-authored using generative AI tooling?
No.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Anything related to backend services common engine frontend Changes related to the frontend GUI service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Batch Execution Mode

3 participants