Skip to content

Conversation

@xuanyuanking
Copy link
Member

@xuanyuanking xuanyuanking commented Jul 22, 2018

What changes were proposed in this pull request?

Modify the strategy in ColumnPruning to add a Project between ScriptTransformation and its child, this strategy can reduce the scan time especially in the scenario of the table has many columns.

How was this patch tested?

Add UT in ColumnPruningSuite and ScriptTransformationSuite.

@xuanyuanking
Copy link
Member Author

@gatorsmile @maropu This is the follow up PR for #21447, please have a look when you have time, thanks.

@SparkQA
Copy link

SparkQA commented Jul 22, 2018

Test build #93413 has finished for PR 21839 at commit 68869d9.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@maropu
Copy link
Member

maropu commented Jul 23, 2018

Thanks for the work! I’ll review this in hours.

@maropu
Copy link
Member

maropu commented Jul 23, 2018

LGTM cc: @gatorsmile

case e @ Expand(_, _, child) if (child.outputSet -- e.references).nonEmpty =>
e.copy(child = prunedChild(child, e.references))
case s @ ScriptTransformation(_, _, _, child, _)
if (child.outputSet -- s.references).nonEmpty =>
Copy link
Member

Choose a reason for hiding this comment

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

Nit: two more spaces before if.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fix in 2cf131f.

@gatorsmile
Copy link
Member

@xuanyuanking Could you add an end-to-end test into ScriptTransformationSuite to verify the results?

@xuanyuanking
Copy link
Member Author

@gatorsmile Thanks for your advice, added ut in ScriptTransformationSuite.

@gatorsmile
Copy link
Member

LGTM

@SparkQA
Copy link

SparkQA commented Jul 23, 2018

Test build #93448 has finished for PR 21839 at commit 2cf131f.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gatorsmile
Copy link
Member

Thanks! Merged to master.

@asfgit asfgit closed this in cfc3e1a Jul 23, 2018
@xuanyuanking
Copy link
Member Author

Thanks for reviewing.

@xuanyuanking xuanyuanking deleted the SPARK-24339 branch July 24, 2018 05:11
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.

4 participants