You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "pepijnve (via GitHub)" <gi...@apache.org> on 2025/07/31 13:19:37 UTC
[PR] #16994 Ensure CooperativeExec#maintains_input_order returns a Vec of the correct size [datafusion]
pepijnve opened a new pull request, #16995:
URL: https://github.com/apache/datafusion/pull/16995
## Which issue does this PR close?
- Closes #16994.
## Rationale for this change
The initial implementation of `CooperativeExec#maintains_input_order` is not correct and is likely to return a `Vec` with the wrong size.
## What changes are included in this PR?
Update the implementation of `maintains_input_order` to `vec![true; self.children().len()]` since `CooperativeExec` does not modify input order in any way.
## Are these changes tested?
Still working on unit test(s) that demonstrate the problem.
## Are there any user-facing changes?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] #16994 Ensure CooperativeExec#maintains_input_order returns a Vec of the correct size [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #16995:
URL: https://github.com/apache/datafusion/pull/16995#issuecomment-3151671037
Thanks again @pepijnve and @xudong963
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] #16994 Ensure CooperativeExec#maintains_input_order returns a Vec of the correct size [datafusion]
Posted by "pepijnve (via GitHub)" <gi...@apache.org>.
pepijnve commented on PR #16995:
URL: https://github.com/apache/datafusion/pull/16995#issuecomment-3143779663
I added a number of invariant checks as suggested in https://github.com/apache/datafusion/issues/16994#issuecomment-3141279920
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] #16994 Ensure CooperativeExec#maintains_input_order returns a Vec of the correct size [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #16995:
URL: https://github.com/apache/datafusion/pull/16995
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] #16994 Ensure CooperativeExec#maintains_input_order returns a Vec of the correct size [datafusion]
Posted by "pepijnve (via GitHub)" <gi...@apache.org>.
pepijnve commented on PR #16995:
URL: https://github.com/apache/datafusion/pull/16995#issuecomment-3139954754
@alamb this one might require a 49.0.1 😬
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] #16994 Ensure CooperativeExec#maintains_input_order returns a Vec of the correct size [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #16995:
URL: https://github.com/apache/datafusion/pull/16995#discussion_r2248489786
##########
datafusion/physical-plan/src/execution_plan.rs:
##########
@@ -1045,6 +1046,37 @@ impl PlanProperties {
}
}
+macro_rules! check_len {
+ ($target:expr, $func_name:ident, $expected_len:expr) => {
+ let actual_len = $target.$func_name().len();
+ if actual_len != $expected_len {
+ return internal_err!(
+ "{}::{} returned Vec with incorrect size: {} != {}",
+ $target.name(),
+ stringify!($func_name),
+ actual_len,
+ $expected_len
+ );
+ }
+ };
+}
+
+/// Checks a set of invariants that apply to all ExecutionPlan implementations.
+/// Returns an error if the given node does not conform.
+pub fn check_default_invariants<P: ExecutionPlan + ?Sized>(
Review Comment:
👍 this is a good one
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] #16994 Ensure CooperativeExec#maintains_input_order returns a Vec of the correct size [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #16995:
URL: https://github.com/apache/datafusion/pull/16995#issuecomment-3141443691
> @alamb this one might require a 49.0.1 😬
I added it to a "Maybe even 49.0.1" list on
- https://github.com/apache/datafusion/issues/16799
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org