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

Indentation is incorrect for joins in formatted physical plans #345

Closed
andygrove opened this issue May 15, 2021 · 1 comment · Fixed by #358
Closed

Indentation is incorrect for joins in formatted physical plans #345

andygrove opened this issue May 15, 2021 · 1 comment · Fixed by #358
Assignees
Labels
bug Something isn't working datafusion Changes in the datafusion crate good first issue Good for newcomers

Comments

@andygrove
Copy link
Member

andygrove commented May 15, 2021

Describe the bug
The new physical plan formatting code does not handle joins correctly. Both children of a join should be shown at the same indent level.

Here is an example of an incorrectly formatted plan:

ballista-executor_1   |     HashAggregateExec: mode=Partial, gby=[l_shipmode], aggr=[SUM(CASE WHEN #o_orderpriority Eq Utf8("1-URGENT") Or #o_orderpriority Eq Utf8("2-HIGH") THEN Int64(1) ELSE Int64(0) END), SUM(CASE WHEN #o_orderpriority NotEq Utf8("1-URGENT") And #o_orderpriority NotEq Utf8("2-HIGH") THEN Int64(1) ELSE Int64(0) END)]
ballista-executor_1   |       CoalesceBatchesExec: target_batch_size=4096
ballista-executor_1   |         HashJoinExec: mode=CollectLeft, join_type=Inner, on=[("l_orderkey", "o_orderkey")]
ballista-executor_1   |           CoalesceBatchesExec: target_batch_size=4096
ballista-executor_1   |             FilterExec: l_shipmode IN ([Literal { value: Utf8("MAIL") }, Literal { value: Utf8("SHIP") }]) AND l_commitdate < l_receiptdate AND l_shipdate < l_commitdate AND l_receiptdate >= CAST(1994-01-01 AS Date32) AND l_receiptdate < CAST(1995-01-01 AS Date32)
ballista-executor_1   |               CsvExec: source=Path(/data/lineitem.tbl: [/data/lineitem.tbl]), has_header=false
ballista-executor_1   |                 CsvExec: source=Path(/data/orders.tbl: [/data/orders.tbl]), has_header=false

To Reproduce
Run the integration tests and look at the logs (once #344 is merged).

Expected behavior
Both children of a join should be shown at the same indent level.

Additional context
Feature was added in #337

@andygrove andygrove added bug Something isn't working datafusion Changes in the datafusion crate labels May 15, 2021
@andygrove
Copy link
Member Author

@alamb fyi

@alamb alamb added the good first issue Good for newcomers label May 16, 2021
@alamb alamb self-assigned this May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working datafusion Changes in the datafusion crate good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants