Skip to content

Conversation

yaooqinn
Copy link
Member

@yaooqinn yaooqinn commented Sep 24, 2016

What changes were proposed in this pull request?

A WholeStageCodeGened stage with multiple CodegenSupport Operators generates unused result rows and their associated buffer holders and row writers, which can be removed.

How was this patch tested?

existing ut.

cc @davies @rxin @srowen

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

Copy link
Contributor

@rednaxelafx rednaxelafx left a comment

Choose a reason for hiding this comment

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

Hi, the goal of this PR looks interesting but the approach needs more explanation.
Could you please elaborate on the semantics of this new isWholeStageResultVar argument, give an example of how that affects the code in GenerateUnsafeProjection, and why is GenerateUnsafeProjection.createCode() the only place you're applying this new feature?

initCode: String, isWholeStageResultVar: Boolean = false): Unit = {
if (isWholeStageResultVar) {
mutableStates = mutableStates.filterNot(state => (state._1 == javaType) && state._4)
mutableStates += ((javaType, variableName, initCode, isWholeStageResultVar))
Copy link
Contributor

Choose a reason for hiding this comment

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

So you're effectively letting later-added states to override earlier-added ones that are equivalent and replaceable. Could that be done in a add-if-absent way instead?
Also, what's the criteria for a state to be "replaceable" in your design? Could you please make that explicit as comment in the code?

@kiszk
Copy link
Member

kiszk commented Jun 21, 2017

Could you please add the simple generated code in the description before and after applying this PR?

@HyukjinKwon
Copy link
Member

gentle ping @yaooqinn on ^.

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.

5 participants