-
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
Convert Column Name to String Before Using Struct Column Factory #10156
Convert Column Name to String Before Using Struct Column Factory #10156
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-22.04 #10156 +/- ##
===============================================
Coverage ? 10.47%
===============================================
Files ? 122
Lines ? 20505
Branches ? 0
===============================================
Hits ? 2147
Misses ? 18358
Partials ? 0 Continue to review full report at Codecov.
|
Maybe we should add a user warning that an implicit conversion is happening here? |
Offline with @shwina , what we decided here is not to implicitly cast the column names to strings. Instead, every user who calls |
Code changed significantly since last review.
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.
Other than Bradley's suggestions LGTM!
Co-authored-by: Bradley Dice <[email protected]>
@gpucibot merge |
Closes #10155
build_struct_column
requires that the field names to be strings. But dataframe column names can be any hashable types. Passing in column names as field names into_struct
is thus unsafe. This PR adds a check and raise a warning if the cast to string is required to take place.