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

[Rust][DataFusion] Implement Debug for ExecutionPlan trait #25739

Closed
asfimport opened this issue Aug 10, 2020 · 1 comment
Closed

[Rust][DataFusion] Implement Debug for ExecutionPlan trait #25739

asfimport opened this issue Aug 10, 2020 · 1 comment

Comments

@asfimport
Copy link
Collaborator

For ARROW-9653, I was trying to debug the execution plan and I would have found it easier if there had been a way to display the execution plan to better understand and isolate the issue. This would also be nice to have as part of EXPLAIN plan functionality in ARROW-9654

In general, for debugging purposes, we would like to be able to dump out an execution plan. To do so in the idiomatic rust way, we should require that ExecutionPlan also implement std::fmt::Debug

Here is an example plan for "SELECT c1, c2, MIN(c3) FROM aggregate_test_100 GROUP BY c1, c2"

physical plan is HashAggregateExec {
    group_expr: [
        Column {
            name: "c1",
        },
        Column {
            name: "c2",
        },
    ],
    aggr_expr: [
        Min {
            expr: Column {
                name: "c3",
            },
        },
    ],
    input: DataSourceExec {
        schema: Schema {
            fields: [
                Field {
                    name: "c1",
                    data_type: Utf8,
                    nullable: false,
                    dict_id: 0,
                    dict_is_ordered: false,
                },
                Field {
                    name: "c2",
                    data_type: UInt32,
                    nullable: false,
                    dict_id: 0,
                    dict_is_ordered: false,
                },
                Field {
                    name: "c3",
                    data_type: Int8,
                    nullable: false,
                    dict_id: 0,
                    dict_is_ordered: false,
                },
            ],
            metadata: {},
        },
        partitions.len: 1,
    },
    schema: Schema {
        fields: [
            Field {
                name: "c1",
                data_type: Utf8,
                nullable: true,
                dict_id: 0,
                dict_is_ordered: false,
            },
            Field {
                name: "c2",
                data_type: UInt32,
                nullable: true,
                dict_id: 0,
                dict_is_ordered: false,
            },
            Field {
                name: "MIN(c3)",
                data_type: Int64,
                nullable: true,
                dict_id: 0,
                dict_is_ordered: false,
            },
        ],
        metadata: {},
    },
}

Reporter: Andrew Lamb / @alamb
Assignee: Andrew Lamb / @alamb

PRs and other links:

Note: This issue was originally created as ARROW-9683. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Andy Grove / @andygrove:
Issue resolved by pull request 7925
#7925

@asfimport asfimport added this to the 2.0.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants