-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-23762][SQL] UTF8StringBuffer uses MemoryBlock #20871
Conversation
Test build #88462 has finished for PR 20871 at commit
|
Test build #88469 has finished for PR 20871 at commit
|
Test build #88894 has finished for PR 20871 at commit
|
retest this please |
Test build #88964 has finished for PR 20871 at commit
|
retest this please |
buffer = tmp; | ||
} | ||
} | ||
|
||
private int totalSize() { | ||
return cursor - Platform.BYTE_ARRAY_OFFSET; | ||
return length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since totalSize
is privately used only, and now it is simply length
, I think we can remove it and just use length
.
Test build #88963 has finished for PR 20871 at commit
|
Test build #88967 has finished for PR 20871 at commit
|
import org.apache.spark.SparkFunSuite | ||
import org.apache.spark.unsafe.types.UTF8String | ||
|
||
class UTF8StringBufferSuite extends SparkFunSuite { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UTF8StringBufferSuite -> UTF8StringBuilderSuite?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch
Test build #88972 has finished for PR 20871 at commit
|
Test build #88988 has finished for PR 20871 at commit
|
ping @cloud-fan |
LGTM |
Btw, it is better to check if any lint-java issue because this involves java change. |
Thank you for your suggestion. I installed checkstyle plug-in into Intellij today. |
ping @cloud-fan |
retest this please |
Test build #89148 has finished for PR 20871 at commit
|
retest this please |
Test build #89171 has finished for PR 20871 at commit
|
retest this please |
Test build #89191 has finished for PR 20871 at commit
|
retest this please |
Test build #89196 has finished for PR 20871 at commit
|
retest this please |
Test build #89211 has finished for PR 20871 at commit
|
ping @cloud-fan |
thanks, merging to master! |
What changes were proposed in this pull request?
This PR tries to use
MemoryBlock
inUTF8StringBuffer
. In general, there are two advantages to useMemoryBlock
.PlatformMemory
Object
.How was this patch tested?
Added
UTF8StringBufferSuite