[SPARK-25426][SQL] Remove the duplicate fallback logic in UnsafeProjection#22417
Closed
maropu wants to merge 3 commits intoapache:masterfrom
Closed
[SPARK-25426][SQL] Remove the duplicate fallback logic in UnsafeProjection#22417maropu wants to merge 3 commits intoapache:masterfrom
maropu wants to merge 3 commits intoapache:masterfrom
Conversation
|
Test build #96058 has finished for PR 22417 at commit
|
viirya
reviewed
Sep 14, 2018
| } | ||
|
|
||
| protected def createCodeGeneratedObject(in: IN): OUT | ||
| protected def createCodeGeneratedObject(in: IN, subexpressionEliminationEnabled: Boolean): OUT |
Member
There was a problem hiding this comment.
If we are going to get config directly from SQLConf, why do we need to pass it as a parameter here?
Can we keep this API untouched and let createCodeGeneratedObject implementation to take care of it?
Like:
object UnsafeProjection
extends CodeGeneratorWithInterpretedFallback[Seq[Expression], UnsafeProjection] {
override protected def createCodeGeneratedObject(in: Seq[Expression]): UnsafeProjection = {
GenerateUnsafeProjection.generate(in, SQLConf.get.subexpressionEliminationEnabled)
}
...
}I think it is much simpler.
Member
Author
There was a problem hiding this comment.
ah, yes. Looks reasonable. I'll update soon.
This reverts commit 35e7911.
|
Test build #96073 has finished for PR 22417 at commit
|
|
Test build #96074 has finished for PR 22417 at commit
|
Contributor
|
LGTM |
Member
|
LGTM too. |
Member
Author
|
cc: @cloud-fan |
gatorsmile
reviewed
Sep 15, 2018
Member
gatorsmile
left a comment
There was a problem hiding this comment.
LGTM
Thanks! Merged to master.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This pr removed the duplicate fallback logic in
UnsafeProjection.This pr comes from #22355.
How was this patch tested?
Added tests in
CodeGeneratorWithInterpretedFallbackSuite.