You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "getChan (via GitHub)" <gi...@apache.org> on 2025/04/06 14:14:05 UTC

[PR] chore: Repartitionexec display tree [datafusion]

getChan opened a new pull request, #15606:
URL: https://github.com/apache/datafusion/pull/15606

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   - Closes #.
   
   ## Rationale for this change
   It is easy to understand because it means the number of `RepartitionExec` input's output partitions 
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   ## Are these changes tested?
   Yes
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   ## Are there any user-facing changes?
   explain tree displaying
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->
   


-- 
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] chore: improve RepartitionExec display tree [datafusion]

Posted by "2010YOUY01 (via GitHub)" <gi...@apache.org>.
2010YOUY01 commented on code in PR #15606:
URL: https://github.com/apache/datafusion/pull/15606#discussion_r2030756671


##########
datafusion/physical-plan/src/repartition/mod.rs:
##########
@@ -510,7 +510,7 @@ impl DisplayAs for RepartitionExec {
                 writeln!(f, "partitioning_scheme={}", self.partitioning(),)?;
                 writeln!(
                     f,
-                    "output_partition_count={}",
+                    "input_partition_count={}",
                     self.input.output_partitioning().partition_count()

Review Comment:
   Maybe as a follow-up task we can update it to be more clear like
   ```text
   input_partition_count: 1
   output_partition_count: 4
   
   partition_schema: RoundRobin
   ```



-- 
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] chore: improve RepartitionExec display tree [datafusion]

Posted by "2010YOUY01 (via GitHub)" <gi...@apache.org>.
2010YOUY01 commented on code in PR #15606:
URL: https://github.com/apache/datafusion/pull/15606#discussion_r2030644638


##########
datafusion/physical-plan/src/repartition/mod.rs:
##########
@@ -510,7 +510,7 @@ impl DisplayAs for RepartitionExec {
                 writeln!(f, "partitioning_scheme={}", self.partitioning(),)?;
                 writeln!(
                     f,
-                    "output_partition_count={}",
+                    "input_partition_count={}",
                     self.input.output_partitioning().partition_count()

Review Comment:
   I think the output partition number is required to display in this node, but it's not implemented correctly. (or maybe now the planner always set the output partition the same as the input partition count)
   I suggest to change the implementation instead, maybe we can display both the input and output partition count.



-- 
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] chore: improve RepartitionExec display tree [datafusion]

Posted by "2010YOUY01 (via GitHub)" <gi...@apache.org>.
2010YOUY01 commented on code in PR #15606:
URL: https://github.com/apache/datafusion/pull/15606#discussion_r2030756671


##########
datafusion/physical-plan/src/repartition/mod.rs:
##########
@@ -510,7 +510,7 @@ impl DisplayAs for RepartitionExec {
                 writeln!(f, "partitioning_scheme={}", self.partitioning(),)?;
                 writeln!(
                     f,
-                    "output_partition_count={}",
+                    "input_partition_count={}",
                     self.input.output_partitioning().partition_count()

Review Comment:
   Maybe as a follow-up task we can update it to be more clear like
   ```text
   input_partition_count: 1
   output_partition_count: 4
   
   partition_scheme: RoundRobin
   ```



-- 
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] chore: improve RepartitionExec display tree [datafusion]

Posted by "2010YOUY01 (via GitHub)" <gi...@apache.org>.
2010YOUY01 merged PR #15606:
URL: https://github.com/apache/datafusion/pull/15606


-- 
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] chore: improve RepartitionExec display tree [datafusion]

Posted by "getChan (via GitHub)" <gi...@apache.org>.
getChan commented on code in PR #15606:
URL: https://github.com/apache/datafusion/pull/15606#discussion_r2030693362


##########
datafusion/physical-plan/src/repartition/mod.rs:
##########
@@ -510,7 +510,7 @@ impl DisplayAs for RepartitionExec {
                 writeln!(f, "partitioning_scheme={}", self.partitioning(),)?;
                 writeln!(
                     f,
-                    "output_partition_count={}",
+                    "input_partition_count={}",
                     self.input.output_partitioning().partition_count()

Review Comment:
   thanks for review.
   The output partition number is already included in the `partitioning_scheme`, so it is displayed.
   ex)
   ```
   13)┌─────────────┴─────────────┐
   14)│      RepartitionExec      │
   15)│    --------------------   │
   16)│   input_partition_count:  │
   17)│             1             │
   18)│                           │
   19)│    partitioning_scheme:   │
   20)│     RoundRobinBatch(4)    │
   21)└─────────────┬─────────────┘
   ```



-- 
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