Skip to content

Add Trino cost profiling support and learned default parameters - #787

Merged
zkaoudi merged 24 commits into
apache:mainfrom
JunWang222:feature/trino-cost-profiling
Aug 20, 2026
Merged

zkaoudi merged 24 commits into
apache:mainfrom
JunWang222:feature/trino-cost-profiling

Conversation

@JunWang222

Copy link
Copy Markdown
Contributor

This PR adds Trino cost profiling support, including:

  • A Trino profiling pilot for running operator cost profiling locally
  • Shared profiling documentation that explains how users can rerun profiling on their own machine
  • Trino-specific setup notes and command examples
  • Default Trino cost parameters for users who want to try Wayang with Trino

The default parameters are intended as starting values. For accurate optimization on a specific machine or deployment, users should follow the profiling guide and regenerate parameters locally.

@zkaoudi

zkaoudi commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@JunWang222 some conflicts here too

@zkaoudi zkaoudi 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.

please check some minor comments. Thank you @JunWang222 :)

final Job job = wayangContext.createJob(null, wayangPlan);
// ILLEGAL: We blacklist the Spark platform, although we need it.
// ILLEGAL: We blacklist all platforms that can execute the plan.
job.getConfiguration().getPlatformProvider().addToBlacklist(Java.platform());

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.

Java is added here to the black list, but only flink is added in the context (line 318). Do we need to add Java to the black list too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The intention of this test is to register both Java and Flink, then blacklist both executable platforms so that only the made-up platform remains and the job fails as expected. I will make this explicit by changing the context setup from makeContext(FLINK) to makeContext(BOTH).

Comment thread guides/cost-profiling.md
```text
CPU load = alpha * number_of_rows + beta
```

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.

we can add here that alpha=10 and beta=800000 in the example configuration above.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will add the number in the example, thank you!

zkaoudi
zkaoudi previously approved these changes Aug 17, 2026
@zkaoudi

zkaoudi commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

@JunWang222 can you resolve conflicts here?

@zkaoudi
zkaoudi merged commit d90f4a5 into apache:main Aug 20, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants