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

DRILL-5665: planner.force_2phase_aggr only overrides small inputs #872

Closed
wants to merge 1 commit into from

Conversation

Ben-Zvi
Copy link
Contributor

@Ben-Zvi Ben-Zvi commented Jul 11, 2017

The planner option planner.force_2phase_aggr was created for testing, but may be used someday by a customer to allow spilling (currently single phase can not spill).
That option was implemented unconditionally, thus potentially violating other checks.

The code change is to only use this option to bypass a single check -- for small input tables.

RelNode child = call.rel(0).getInputs().get(0);
boolean smallInput = child.getRows() < settings.getSliceTarget();
boolean smallInput = child.getRows() < settings.getSliceTarget() &&

Choose a reason for hiding this comment

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

Overloading smallInput makes it confusing. Why not modify the if condition below to :
(... || (smallInput && !settings.isForce2phaseAggr())
This way the meaning of smallInput is not changed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@amansinha100
Copy link

+1

arina-ielchiieva pushed a commit to arina-ielchiieva/drill that referenced this pull request Jul 21, 2017
@asfgit asfgit closed this in 943a143 Jul 21, 2017
@Ben-Zvi Ben-Zvi deleted the DRILL-5665 branch July 10, 2018 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants