You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Jefffrey (via GitHub)" <gi...@apache.org> on 2023/04/15 13:07:14 UTC

[GitHub] [arrow-datafusion] Jefffrey opened a new pull request, #6020: Add analyzer output to verbose explain

Jefffrey opened a new pull request, #6020:
URL: https://github.com/apache/arrow-datafusion/pull/6020

   # 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 #5598
   
   # Rationale for this change
   
   <!--
    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.  
   -->
   
   With new separate analyzer stage, split off from logical optimizer stage, should have output of these rules in verbose explain for debugging
   
   # 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.
   -->
   
   Example output now:
   
   ```
   ❯ explain verbose select * from part;
   +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | plan_type                                                  | plan                                                                                                                                                                                                                                                                            |
   +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | initial_logical_plan                                       | Projection: part.id, part.bool_col, part.tinyint_col, part.smallint_col, part.int_col, part.bigint_col, part.float_col, part.double_col, part.date_string_col, part.string_col, part.timestamp_col                                                                              |
   |                                                            |   TableScan: part                                                                                                                                                                                                                                                               |
   | logical_plan after inline_table_scan                       | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after type_coercion                           | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after count_wildcard_rule                     | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | analyzed_logical_plan                                      | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after simplify_expressions                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after unwrap_cast_in_comparison               | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after replace_distinct_aggregate              | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after decorrelate_where_exists                | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after decorrelate_where_in                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after scalar_subquery_to_join                 | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after extract_equijoin_predicate              | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after simplify_expressions                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after merge_projection                        | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after rewrite_disjunctive_predicate           | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after eliminate_duplicated_expr               | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after eliminate_filter                        | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after eliminate_cross_join                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after common_sub_expression_eliminate         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after eliminate_limit                         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after propagate_empty_relation                | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after filter_null_join_keys                   | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after eliminate_outer_join                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after push_down_limit                         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after push_down_filter                        | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after single_distinct_aggregation_to_group_by | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after simplify_expressions                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after unwrap_cast_in_comparison               | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after common_sub_expression_eliminate         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after push_down_projection                    | Projection: part.id, part.bool_col, part.tinyint_col, part.smallint_col, part.int_col, part.bigint_col, part.float_col, part.double_col, part.date_string_col, part.string_col, part.timestamp_col                                                                              |
   |                                                            |   TableScan: part projection=[id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col, double_col, date_string_col, string_col, timestamp_col]                                                                                                                  |
   | logical_plan after eliminate_projection                    | TableScan: part projection=[id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col, double_col, date_string_col, string_col, timestamp_col]                                                                                                                    |
   | logical_plan after push_down_limit                         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after simplify_expressions                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after unwrap_cast_in_comparison               | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after replace_distinct_aggregate              | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after decorrelate_where_exists                | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after decorrelate_where_in                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after scalar_subquery_to_join                 | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after extract_equijoin_predicate              | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after simplify_expressions                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after merge_projection                        | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after rewrite_disjunctive_predicate           | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after eliminate_duplicated_expr               | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after eliminate_filter                        | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after eliminate_cross_join                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after common_sub_expression_eliminate         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after eliminate_limit                         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after propagate_empty_relation                | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after filter_null_join_keys                   | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after eliminate_outer_join                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after push_down_limit                         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after push_down_filter                        | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after single_distinct_aggregation_to_group_by | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after simplify_expressions                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after unwrap_cast_in_comparison               | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after common_sub_expression_eliminate         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after push_down_projection                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after eliminate_projection                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan after push_down_limit                         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | logical_plan                                               | TableScan: part projection=[id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col, double_col, date_string_col, string_col, timestamp_col]                                                                                                                    |
   | initial_physical_plan                                      | ParquetExec: limit=None, partitions={1 group: [[home/jeffrey/Code/arrow-datafusion/parquet-testing/data/alltypes_plain.parquet]]}, projection=[id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col, double_col, date_string_col, string_col, timestamp_col] |
   |                                                            |                                                                                                                                                                                                                                                                                 |
   | physical_plan after aggregate_statistics                   | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | physical_plan after join_selection                         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | physical_plan after PipelineFixer                          | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | physical_plan after repartition                            | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | physical_plan after global_sort_selection                  | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | physical_plan after EnforceDistribution                    | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | physical_plan after EnforceSorting                         | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | physical_plan after CombinePartialFinalAggregate           | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | physical_plan after coalesce_batches                       | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | physical_plan after PipelineChecker                        | SAME TEXT AS ABOVE                                                                                                                                                                                                                                                              |
   | physical_plan                                              | ParquetExec: limit=None, partitions={1 group: [[home/jeffrey/Code/arrow-datafusion/parquet-testing/data/alltypes_plain.parquet]]}, projection=[id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col, double_col, date_string_col, string_col, timestamp_col] |
   |                                                            |                                                                                                                                                                                                                                                                                 |
   +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   ```
   
   # Are these changes tested?
   
   <!--
   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?
   
   <!--
   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@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb commented on pull request #6020: Add analyzer output to verbose explain

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #6020:
URL: https://github.com/apache/arrow-datafusion/pull/6020#issuecomment-1509887485

   cc @mingmwang 


-- 
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@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb merged pull request #6020: Add analyzer output to verbose explain

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #6020:
URL: https://github.com/apache/arrow-datafusion/pull/6020


-- 
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@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org