Skip to content

Commit 274cdba

Browse files
Jefffreyalamb
andauthored
Normalize NUL to \0 in sqllogictests (#17181)
* Normalize `NUL` to `\0` in sqllogictests * Update datafusion/sqllogictest/src/engines/conversion.rs Co-authored-by: Andrew Lamb <[email protected]> --------- Co-authored-by: Andrew Lamb <[email protected]>
1 parent 516f971 commit 274cdba

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

datafusion/sqllogictest/src/engines/conversion.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ pub(crate) fn varchar_to_str(value: &str) -> String {
3535
if value.is_empty() {
3636
"(empty)".to_string()
3737
} else {
38-
value.trim_end_matches('\n').to_string()
38+
// Escape nulls so that github renders them correctly in the webui
39+
value.trim_end_matches('\n').replace("\u{0000}", "\\0")
3940
}
4041
}
4142

1 Byte
Binary file not shown.
1 Byte
Binary file not shown.

0 commit comments

Comments
 (0)