Skip to content
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-18011] Fix SparkR NA date serialization #39681

Closed
wants to merge 2 commits into from

Conversation

joveyuan-db
Copy link
Contributor

What changes were proposed in this pull request?

This PR ensures that SparkR serializes NA dates as "NA" (string) to avoid an undefined length when deserializing in the JVM.

Why are the changes needed?

Currently, SparkR assumes that a NegativeArraySizeException when deserializing dates and timestamps represents an NA. However, this handling can be made more robust by ensuring that serialization on the R side always provides a valid string length (note that nchar(as.character(as.Date(NA))) is NA).

Does this PR introduce any user-facing change?

No

How was this patch tested?

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@joveyuan-db joveyuan-db marked this pull request as ready for review January 23, 2023 20:35
@HyukjinKwon
Copy link
Member

Merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants