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

fix: properly satisfy enforcesorting rules #2814

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

universalmind303
Copy link
Contributor

closes #2811

Comment on lines +289 to +296
fn required_input_ordering(&self) -> Vec<Option<Vec<PhysicalSortRequirement>>> {
// the input ordering must match the output ordering of the source
// without this, the sort may get removed by the optimizer
vec![self
.output_ordering()
.map(PhysicalSortRequirement::from_sort_exprs)]
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the WriteOnlyDataSourceMetricsExecAdapter needs an explicit check on the input ordering, otherwise the EnforceSorting rule may remove it. The ReadOnly... doesn't care, so this needed to be split out.

This states that if the child has an explicit output_ordering, then this node needs a matching input_ordering.

@universalmind303 universalmind303 changed the title fix: enforcesorting rules fix: properly satisfy enforcesorting rules Mar 21, 2024
@universalmind303 universalmind303 merged commit fd58886 into main Mar 21, 2024
25 checks passed
@universalmind303 universalmind303 deleted the universalmind303/copy-to-fix branch March 21, 2024 22:49
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.

COPY TO perf discrepancies
2 participants