-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[data] explain optimized #58074
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
[data] explain optimized #58074
Changes from all commits
2517db0
3ff8de3
31cab59
37a2f42
b3668e8
2246101
4910b37
632c9d7
75b8df0
af99c34
a5c229f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -448,38 +448,67 @@ def test_dataset_explain(ray_start_regular_shared, capsys): | |
|
|
||
| ds.explain() | ||
| captured = capsys.readouterr() | ||
| assert captured.out.rstrip() == ( | ||
| assert captured.out.strip() == ( | ||
| "-------- Logical Plan --------\n" | ||
| "Map(<lambda>)\n" | ||
| "+- ReadRange\n" | ||
| "-------- Physical Plan --------\n" | ||
| "MapRows[Map(<lambda>)]\n" | ||
| "+- Read[ReadRange]\n" | ||
| "\n-------- Logical Plan (Optimized) --------\n" | ||
| "MapRows[Map(<lambda>)]\n" | ||
| "+- Read[ReadRange]\n" | ||
| "\n-------- Physical Plan --------\n" | ||
| "TaskPoolMapOperator[Map(<lambda>)]\n" | ||
| "+- TaskPoolMapOperator[ReadRange]\n" | ||
| " +- InputDataBuffer[Input]\n" | ||
| "\n-------- Physical Plan (Optimized) --------\n" | ||
| "TaskPoolMapOperator[ReadRange->Map(<lambda>)]\n" | ||
| "+- InputDataBuffer[Input]" | ||
| ) | ||
|
|
||
| ds = ds.filter(lambda x: x["id"] > 0) | ||
| ds.explain() | ||
| captured = capsys.readouterr() | ||
| assert captured.out.rstrip() == ( | ||
| assert captured.out.strip() == ( | ||
| "-------- Logical Plan --------\n" | ||
| "Filter(<lambda>)\n" | ||
| "+- Map(<lambda>)\n" | ||
| " +- ReadRange\n" | ||
| "-------- Physical Plan --------\n" | ||
| "Filter[Filter(<lambda>)]\n" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @richardliaw should this be
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hi @iamjustinhsu, maybe we can in pick up #57798 here?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you mean to combine the PRs? I think we should keep these separate because they serve different purposes, although merge conflicts will be a bit messy. |
||
| "+- MapRows[Map(<lambda>)]\n" | ||
| " +- Read[ReadRange]\n" | ||
| "\n-------- Logical Plan (Optimized) --------\n" | ||
| "Filter[Filter(<lambda>)]\n" | ||
| "+- MapRows[Map(<lambda>)]\n" | ||
| " +- Read[ReadRange]\n" | ||
| "\n-------- Physical Plan --------\n" | ||
| "TaskPoolMapOperator[Filter(<lambda>)]\n" | ||
| "+- TaskPoolMapOperator[Map(<lambda>)]\n" | ||
| " +- TaskPoolMapOperator[ReadRange]\n" | ||
| " +- InputDataBuffer[Input]\n" | ||
| "\n-------- Physical Plan (Optimized) --------\n" | ||
| "TaskPoolMapOperator[ReadRange->Map(<lambda>)->Filter(<lambda>)]\n" | ||
| "+- InputDataBuffer[Input]" | ||
| ) | ||
| ds = ds.random_shuffle().map(lambda x: x) | ||
| ds.explain() | ||
| captured = capsys.readouterr() | ||
| assert captured.out.rstrip() == ( | ||
| assert captured.out.strip() == ( | ||
| "-------- Logical Plan --------\n" | ||
| "Map(<lambda>)\n" | ||
| "+- RandomShuffle\n" | ||
| " +- Filter(<lambda>)\n" | ||
| " +- Map(<lambda>)\n" | ||
| " +- ReadRange\n" | ||
| "-------- Physical Plan --------\n" | ||
| "MapRows[Map(<lambda>)]\n" | ||
| "+- RandomShuffle[RandomShuffle]\n" | ||
| " +- Filter[Filter(<lambda>)]\n" | ||
| " +- MapRows[Map(<lambda>)]\n" | ||
| " +- Read[ReadRange]\n" | ||
| "\n-------- Logical Plan (Optimized) --------\n" | ||
| "MapRows[Map(<lambda>)]\n" | ||
| "+- RandomShuffle[RandomShuffle]\n" | ||
| " +- Filter[Filter(<lambda>)]\n" | ||
| " +- MapRows[Map(<lambda>)]\n" | ||
| " +- Read[ReadRange]\n" | ||
| "\n-------- Physical Plan --------\n" | ||
| "TaskPoolMapOperator[Map(<lambda>)]\n" | ||
| "+- AllToAllOperator[RandomShuffle]\n" | ||
| " +- TaskPoolMapOperator[Filter(<lambda>)]\n" | ||
| " +- TaskPoolMapOperator[Map(<lambda>)]\n" | ||
| " +- TaskPoolMapOperator[ReadRange]\n" | ||
| " +- InputDataBuffer[Input]\n" | ||
| "\n-------- Physical Plan (Optimized) --------\n" | ||
| "TaskPoolMapOperator[Map(<lambda>)]\n" | ||
| "+- AllToAllOperator[ReadRange->Map(<lambda>)->Filter(<lambda>)->RandomShuffle]\n" | ||
| " +- InputDataBuffer[Input]" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.