Skip to content

[FEA][JNI] Throw specific exception from Table.readJSON instead of AssertionError #14331

@andygrove

Description

@andygrove

Is your feature request related to a problem? Please describe.
Per the discussion at NVIDIA/spark-rapids#9304 (comment), the Spark plugin currently has to parse the error message from an AssertionError, which is an anti-pattern. This happens when the plugin calls Table.readJSON where the input is not JSON format.

This exception is thrown in the constructor for Table:

  public Table(long[] cudfColumns) {
    assert cudfColumns != null && cudfColumns.length > 0 : "CudfColumns can't be null or empty";

Describe the solution you'd like
We should throw a specific exception instead.

Describe alternatives you've considered
None

Additional context
None

Metadata

Metadata

Assignees

No one assigned

    Labels

    0 - BacklogIn queue waiting for assignmentSparkFunctionality that helps Spark RAPIDScuIOcuIO issuefeature requestNew feature or requestlibcudfAffects libcudf (C++/CUDA) code.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions