Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename rewriter #23398

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public SubPlan optimize(SubPlan root, RuntimeInfoProvider runtimeInfoProvider)

// rewrite remote source nodes to exchange nodes, except for fragments which are finisher or whose stats are
// estimated by progress.
ReplaceUnchangedFragmentsWithRemoteSourcesRewriter rewriter = new ReplaceUnchangedFragmentsWithRemoteSourcesRewriter(runtimeInfoProvider);
ReplaceRemoteSourcesWithExchanges rewriter = new ReplaceRemoteSourcesWithExchanges(runtimeInfoProvider);
PlanNode currentAdaptivePlan = rewriteWith(rewriter, root.getFragment().getRoot(), root.getChildren());

// Remove the adaptive plan node and replace it with initial plan
Expand Down Expand Up @@ -306,12 +306,12 @@ private Stream<SubPlan> traverse(SubPlan subPlan)
return StreamSupport.stream(iterable.spliterator(), false);
}

private static class ReplaceUnchangedFragmentsWithRemoteSourcesRewriter
private static class ReplaceRemoteSourcesWithExchanges
extends SimplePlanRewriter<List<SubPlan>>
{
private final RuntimeInfoProvider runtimeInfoProvider;

private ReplaceUnchangedFragmentsWithRemoteSourcesRewriter(RuntimeInfoProvider runtimeInfoProvider)
private ReplaceRemoteSourcesWithExchanges(RuntimeInfoProvider runtimeInfoProvider)
{
this.runtimeInfoProvider = requireNonNull(runtimeInfoProvider, "runtimeInfoProvider is null");
}
Expand Down