-
Notifications
You must be signed in to change notification settings - Fork 28k
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-32950][SQL] Remove unnecessary big-endian code paths. #29815
Conversation
} | ||
} | ||
Platform.copyMemory(src, Platform.BYTE_ARRAY_OFFSET + srcIndex, floatData, | ||
Platform.DOUBLE_ARRAY_OFFSET + rowId * 4L, count * 4L); |
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.
Existing bug, but should this be FLOAT_ARRAY_OFFSET (I guess they are the same value)? I can fix this here or can do a separate PR.
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.
It seems Ok to fix here. I presume they are in fact the same, so it has worked to date.
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.
It looks like this won't affect the little-endian code path anyway, so, as long as you confirmed it still works on big-endian, this seems fine if tests pass.
} | ||
} | ||
Platform.copyMemory(src, Platform.BYTE_ARRAY_OFFSET + srcIndex, floatData, | ||
Platform.DOUBLE_ARRAY_OFFSET + rowId * 4L, count * 4L); |
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.
It seems Ok to fix here. I presume they are in fact the same, so it has worked to date.
Jenkins test this please |
There is no need for separate code paths for big- and little-endian platforms in putDoubles and putFloats anymore (since PR apache#24861). On all platforms values are encoded in native byte order and can just be copied directly. Also, fix a typo where DOUBLE_ARRAY_OFFSET was used instead of FLOAT_ARRAY_OFFSET.
ce27770
to
bd4b640
Compare
Test build #128937 has finished for PR 29815 at commit
|
Merged to master |
What changes were proposed in this pull request?
Remove unnecessary code.
Why are the changes needed?
General housekeeping. Might be a slight performance improvement, especially on big-endian systems.
There is no need for separate code paths for big- and little-endian
platforms in putDoubles and putFloats anymore (since PR #24861). On
all platforms values are encoded in native byte order and can just
be copied directly.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing tests.