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-6910: Allow applying DrillPushProjectIntoScanRule at physical phase #1619

wants to merge 1 commit into from


Copy link

vvysotskyi commented Jan 23, 2019

  • Enhance DrillPushProjectIntoScanRule to be applied at the physical stage;
  • Avoid recreating TableScan rel nodes with the same columns during applying DrillPushProjectIntoScanRule;
  • Add unit test;
  • Enable tests for DRILL-912 (the reason why they were disabled was fixed a long time ago).

For problem description please see DRILL-6910.

@vvysotskyi vvysotskyi force-pushed the vvysotskyi:DRILL-6910 branch from aca6036 to c316544 Jan 23, 2019
if (scan.getRowType().getFieldList().isEmpty()) {

ProjectPushInfo projectPushInfo = DrillRelOptUtil.getFieldsInformation(scan.getRowType(), project.getProjects());
if (!canPushProjectIntoScan(scan.getTable(), projectPushInfo)) {
if (!canPushProjectIntoScan(scan.getTable(), projectPushInfo)
|| skipScanConversion(projectPushInfo.createNewRowType(project.getCluster().getTypeFactory()), scan)) {

This comment has been minimized.

Copy link

arina-ielchiieva Jan 23, 2019


If we skip project push down into scan because scan and project rows types are the same, will project be still in plan? Or it will be removed by some other rule later?

This comment has been minimized.

Copy link

vvysotskyi Jan 23, 2019

Author Member

For this case project will be removed using ProjectRemoveRule.
Thanks for pointing this, added a comment to clarify it.

@vvysotskyi vvysotskyi force-pushed the vvysotskyi:DRILL-6910 branch from c316544 to c009036 Jan 23, 2019

This comment has been minimized.

Copy link

arina-ielchiieva commented Jan 23, 2019


@asfgit asfgit closed this in 03f4677 Jan 25, 2019
lushuifeng added a commit to lushuifeng/drill that referenced this pull request Jun 21, 2019
xiangt920 added a commit to xiangt920/drill that referenced this pull request Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.