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

Include ALL modifier for set operators in multi-stage query engine physical explain plan #13166

Merged
merged 1 commit into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public boolean isAll() {

@Override
public String explain() {
return _setOpType.toString();
return _all ? _setOpType.toString() + "_ALL" : _setOpType.toString();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it works in Union? AFAIR union always behaves as all = true. Is this attribute always true in union?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it does look like this attribute is always true for the union set operation (i.e., regardless of whether we use UNION or UNION ALL). I guess that isn't inaccurate though since the actual semantics being implemented are indeed the UNION ALL semantics and the logical plan also contains LogicalUnion(all=[true]) for both UNION and UNION ALL?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I just noticed that the query plan for UNION contains an aggregation on top to only get unique values from the result of the UNION ALL, interesting.

}

@Override
Expand Down
Loading