-
Notifications
You must be signed in to change notification settings - Fork 498
prep_relation_expr earlier in peek sequencing
#33533
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -295,6 +295,25 @@ impl<'s> Optimize<LocalMirPlan<Resolved<'s>>> for Optimizer { | |
| // Set the `as_of` and `until` timestamps for the dataflow. | ||
| df_desc.set_as_of(timestamp_ctx.antichain()); | ||
|
|
||
| // Get the single timestamp representing the `as_of` time. | ||
| let as_of = df_desc | ||
| .as_of | ||
| .clone() | ||
| .expect("as_of antichain") | ||
| .into_option() | ||
| .expect("unique as_of element"); | ||
|
|
||
| // Resolve all unmaterializable function calls including mz_now(). | ||
| let style = ExprPrepStyle::OneShot { | ||
| logical_time: EvalTime::Time(as_of), | ||
| session, | ||
| catalog_state: self.catalog.state(), | ||
| }; | ||
| df_desc.visit_children( | ||
| |r| prep_relation_expr(r, style), | ||
| |s| prep_scalar_expr(s, style), | ||
| )?; | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same concern about |
||
| // Use the opportunity to name an `until` frontier that will prevent | ||
| // work we needn't perform. By default, `until` will be | ||
| // `Antichain::new()`, which prevents no updates and is safe. | ||
|
|
@@ -351,25 +370,6 @@ impl<'s> Optimize<LocalMirPlan<Resolved<'s>>> for Optimizer { | |
| trace_plan!(at: "global", &df_meta.used_indexes(&df_desc)); | ||
| } | ||
|
|
||
| // Get the single timestamp representing the `as_of` time. | ||
| let as_of = df_desc | ||
| .as_of | ||
| .clone() | ||
| .expect("as_of antichain") | ||
| .into_option() | ||
| .expect("unique as_of element"); | ||
|
|
||
| // Resolve all unmaterializable function calls including mz_now(). | ||
| let style = ExprPrepStyle::OneShot { | ||
| logical_time: EvalTime::Time(as_of), | ||
| session, | ||
| catalog_state: self.catalog.state(), | ||
| }; | ||
| df_desc.visit_children( | ||
| |r| prep_relation_expr(r, style), | ||
| |s| prep_scalar_expr(s, style), | ||
| )?; | ||
|
|
||
| // TODO: use the following code once we can be sure that the | ||
| // index_exports always exist. | ||
| // | ||
|
|
||
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be the case that
prep_relation_exprorprep_scalar_exprcould care aboutuntil? If so, we should move the following block before this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fortunately, that can't happen, because we don't pass the
DataflowDescriptiontoprep_relation_exprorprep_scalar_expr, so they have no way of observing whatuntilwe have set on theDataflowDescription.