-
Notifications
You must be signed in to change notification settings - Fork 931
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
Improve print formatting of strings containing newline characters. #11108
Improve print formatting of strings containing newline characters. #11108
Conversation
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.
Replace string const&
with string_view
.
Rest all looks good.
Codecov Report
@@ Coverage Diff @@
## branch-22.08 #11108 +/- ##
===============================================
Coverage ? 86.31%
===============================================
Files ? 144
Lines ? 22729
Branches ? 0
===============================================
Hits ? 19618
Misses ? 3111
Partials ? 0 Continue to review full report at Codecov.
|
Rerun tests. |
@nvdbaranec good to merge this? |
@gpucibot merge |
String data that contained \r and \n characters would print badly mangled.
Example column containing:
Doing a
cudf::test::print()
on this would yield mostly garbage, but importantly, plausible-seeming but puzzling garbage:The fix is to do a little postprocessing and replace the individual chars
'\r'
and'\n'
with the escaped strings"\r"
and"\n"
. Note that this only applies to the output ultimately sent to the print - not to the raw data retrieved from the device itself using::to_host