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

[FEA] Refactoring JSON reader tree algorithms with Compressed Sparse Row (CSR) #15903

Open
GregoryKimball opened this issue May 31, 2024 · 2 comments
Assignees
Labels
cuIO cuIO issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS

Comments

@GregoryKimball
Copy link
Contributor

GregoryKimball commented May 31, 2024

The steady addition of features to the JSON reader has resulted in some code paths that are error-prone (see #15750) and difficult to maintain. Support for mixed types, coercing nested types to string, array of arrays, null literals and more has been added over the past few releases (see comment) and stretched the original design of token-to-tree and tree-to-column processing.

Status Topic
🔄 Introduce column vertex structure and graph traversal to the tree representation. Make sure to maintain the pandas requirements for handling array-of-arrays and null literals.
Introduce mixed type handling with pruning for non-conforming dtypes (updated Spark requirement). Also consider the case where a dtype is not provided for a column with mixed types.
Add an pruning option for cross-column pruning, for cases when validation fails and all values in the row become null
#15278
@GregoryKimball GregoryKimball added feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. cuIO cuIO issue Spark Functionality that helps Spark RAPIDS labels May 31, 2024
@GregoryKimball GregoryKimball added this to the Nested JSON reader milestone May 31, 2024
@GregoryKimball
Copy link
Contributor Author

Hello @shrshi, I added this issue about the refactoring work you started this week. Please excuse me if you documented this elsewhere and I missed it. Please feel free to update these topics with your current picture of the project. Thank you!

@shrshi
Copy link
Contributor

shrshi commented Jun 3, 2024

Tree representation:

This feature introduces a new column_tree_csr struct that stores the column tree representation in CSR format. The nodes are renumbered level-wise instead of being directly mapped to column ids. This serves two purposes - (i) sub-trees matching input dtype schema can be skipped in between-column pruning, and (ii) sub-trees matching non-conforming dtypes in mixed type columns can be similarly skipped (within-column pruning).
The key advantage of wrapping column properties - mixed types and map types support, column pruning, ignoring null literals, column validity, and array of arrays support - as 'non-zero' values in column_tree_csr struct is maintainability and ease of adding new features in the future.

@GregoryKimball GregoryKimball changed the title [FEA] Refactoring JSON reader tree algorithms in 24.08 [FEA] Refactoring JSON reader tree algorithms with Compressed Sparse Row (CSR) Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuIO cuIO issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS
Projects
Status: In Progress
Status: No status
Development

No branches or pull requests

2 participants