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

[WIP] Specify recoverWithNulls in from_json #1443

Closed

Conversation

andygrove
Copy link

cuDF now allows us to specify a recovery mode when parsing JSON. The default mode throws an exception when invalid JSON is encountered, and there is now a RECOVER_WITH_NULL option, which should return a null value for each invalid JSON row in a column.

This PR specifies this option in map_utils::from_json. However, this is not working as expected, and I am creating this PR for discussion purposes.

The included test fails with:

ai.rapids.cudf.CudfException: CUDF failure at:/home/andy/git/nvidia/spark-rapids-jni/src/main/cpp/src/map_utils.cu:146: JSON Parser encountered an invalid format at location 109
        at com.nvidia.spark.rapids.jni.MapUtils.extractRawMapFromJsonString(Native Method)
        at com.nvidia.spark.rapids.jni.MapUtils.extractRawMapFromJsonString(MapUtils.java:49)
        at com.nvidia.spark.rapids.jni.MapUtilsTest.testFromJsonInvalidRows(MapUtilsTest.java:97)

@andygrove andygrove self-assigned this Sep 26, 2023
@andygrove andygrove marked this pull request as draft September 26, 2023 17:21
@andygrove andygrove changed the base branch from branch-23.10 to branch-23.12 October 11, 2023 15:13
@andygrove andygrove changed the base branch from branch-23.12 to branch-24.02 November 27, 2023 14:40
@andygrove
Copy link
Author

This is no longer needed

@andygrove andygrove closed this Jan 29, 2024
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.

1 participant