-
Notifications
You must be signed in to change notification settings - Fork 11
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
Trim does not trim trailing whitespace #133
Comments
@kosak it looks like we need to add trim support to public boolean grabNext(final ByteSlice dest, final MutableBoolean lastInRow)
throws CsvReaderException {
spillBuffer.clear();
startOffset = offset;
if (ignoreSurroundingSpaces) {
skipWhitespace();
}
if (!tryEnsureMore()) {
return false;
}
// Is first char the quote char?
if (buffer[offset] == quoteChar) {
++offset;
processQuotedMode(dest, lastInRow);
if (trim) {
trimWhitespace(dest);
}
} else {
processUnquotedMode(dest, lastInRow);
}
return true;
} It seem that this ignores the leading whitespace: if (ignoreSurroundingSpaces) {
skipWhitespace();
} However, in Perhaps the intended solution was for |
Hi, thanks for the bug report. The issue has been fixed in Deephaven Core 0.27.1 and Deephaven CSV 0.11.0 |
Description
Trailing white space remains even when Trim is set to true.
Steps to reproduce
Load the attached csv into a dh-core repl:
Expected results
I'd expect the
Copy Cell Unformatted
(right-click dropdown menu on a table cell in the deephaven-core web-ui) to demonstrate that all cells are properly trimmed.Actual results
The 2nd and 3rd rows for all three columns have trailing whitespace.
test.csv
The text was updated successfully, but these errors were encountered: