You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "blaginin (via GitHub)" <gi...@apache.org> on 2025/10/23 18:47:50 UTC
[PR] Insta for enforce_distrubution (easy ones) [datafusion]
blaginin opened a new pull request, #18248:
URL: https://github.com/apache/datafusion/pull/18248
All easy cases from https://github.com/apache/datafusion/pull/18185 (that are nicely-ish displayed in git diff).
Note on preserving comments: if it was note about what should happen (or what will be tested), it's placed on top of the snapshot. If that's something that comments part of the plan, I put it below the plan
--
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] Insta for enforce_distrubution (easy ones) [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #18248:
URL: https://github.com/apache/datafusion/pull/18248#issuecomment-3463217136
> thank you!! now the last one 🥁
So close1
--
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] Insta for enforce_distrubution (easy ones) [datafusion]
Posted by "blaginin (via GitHub)" <gi...@apache.org>.
blaginin commented on PR #18248:
URL: https://github.com/apache/datafusion/pull/18248#issuecomment-3462667478
thank you!! now the last 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] Insta for enforce_distrubution (easy ones) [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #18248:
URL: https://github.com/apache/datafusion/pull/18248#discussion_r2471018260
##########
datafusion/core/tests/physical_optimizer/enforce_distribution.rs:
##########
@@ -1168,34 +1304,34 @@ fn reorder_join_keys_to_left_input() -> Result<()> {
&top_join_on,
&join_type,
);
- let top_join_plan =
- format!("HashJoinExec: mode=Partitioned, join_type={:?}, on=[(AA@1, a1@5), (B@2, b1@6), (C@3, c@2)]", &join_type);
- let reordered = reorder_join_keys_to_inputs(top_join)?;
+ let reordered = reorder_join_keys_to_inputs(top_join).unwrap();
// The top joins' join key ordering is adjusted based on the children inputs.
- let expected = &[
- top_join_plan.as_str(),
- " ProjectionExec: expr=[a@0 as A, a@0 as AA, b@1 as B, c@2 as C]",
- " HashJoinExec: mode=Partitioned, join_type=Inner, on=[(a@0, a1@0), (b@1, b1@1), (c@2, c1@2)]",
- " RepartitionExec: partitioning=Hash([a@0, b@1, c@2], 10), input_partitions=10",
- " RepartitionExec: partitioning=RoundRobinBatch(10), input_partitions=1",
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[a, b, c, d, e], file_type=parquet",
- " RepartitionExec: partitioning=Hash([a1@0, b1@1, c1@2], 10), input_partitions=10",
- " RepartitionExec: partitioning=RoundRobinBatch(10), input_partitions=1",
- " ProjectionExec: expr=[a@0 as a1, b@1 as b1, c@2 as c1]",
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[a, b, c, d, e], file_type=parquet",
- " HashJoinExec: mode=Partitioned, join_type=Inner, on=[(c@2, c1@2), (b@1, b1@1), (a@0, a1@0)]",
- " RepartitionExec: partitioning=Hash([c@2, b@1, a@0], 10), input_partitions=10",
- " RepartitionExec: partitioning=RoundRobinBatch(10), input_partitions=1",
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[a, b, c, d, e], file_type=parquet",
- " RepartitionExec: partitioning=Hash([c1@2, b1@1, a1@0], 10), input_partitions=10",
- " RepartitionExec: partitioning=RoundRobinBatch(10), input_partitions=1",
- " ProjectionExec: expr=[a@0 as a1, b@1 as b1, c@2 as c1]",
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[a, b, c, d, e], file_type=parquet",
- ];
-
- assert_plan_txt!(expected, reordered);
+ let (captured_join_type, modified_plan) =
+ hide_first(reordered.as_ref(), r"join_type=(\w+)", "join_type=...");
+ assert_eq!(captured_join_type, join_type.to_string());
+
+ insta::allow_duplicates! {insta::assert_snapshot!(modified_plan, @r"
+HashJoinExec: mode=Partitioned, join_type=..., on=[(AA@1, a1@5), (B@2, b1@6), (C@3, c@2)]
Review Comment:
nice
--
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] Insta for enforce_distrubution (easy ones) [datafusion]
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #18248:
URL: https://github.com/apache/datafusion/pull/18248
--
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