-
Notifications
You must be signed in to change notification settings - Fork 915
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
Fixes Unsupported column type error due to empty list columns in Nested JSON reader #11897
Fixes Unsupported column type error due to empty list columns in Nested JSON reader #11897
Conversation
enable empty input test in nested json reader
Codecov ReportBase: 87.40% // Head: 88.11% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## branch-22.12 #11897 +/- ##
================================================
+ Coverage 87.40% 88.11% +0.70%
================================================
Files 133 133
Lines 21833 21881 +48
================================================
+ Hits 19084 19281 +197
+ Misses 2749 2600 -149
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
C++ looks good to me.
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.
One small request, otherwise looks fine.
cpp/src/io/json/json_column.cu
Outdated
@@ -689,19 +689,24 @@ std::pair<std::unique_ptr<column>, std::vector<column_name_info>> device_json_co | |||
size_type num_rows = json_col.child_offsets.size() - 1; | |||
std::vector<column_name_info> column_names{}; | |||
column_names.emplace_back("offsets"); | |||
column_names.emplace_back(json_col.child_columns.begin()->first); | |||
column_names.emplace_back( | |||
json_col.child_columns.empty() ? "element" : json_col.child_columns.begin()->first); |
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.
I'm guessing this name is only ever seen internally, so it probably doesn't matter much, but I would still prefer using some extremely obvious placeholder name.
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.
moving list_child_name
as global constexpr.
@gpucibot merge |
Description
Fixes
Unsupported column type
error during cudf column creation in Nested JSON reader due to empty list column.During json tree creation, Empty list column does not have
device_json_column
child because it does have any rows, or a type.This PR fixes the issue by creating an empty column as element child column. The list column still retains the null, and empty list information.
Checklist