This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 274cdba753 Normalize `NUL` to `\0` in sqllogictests (#17181)
274cdba753 is described below
commit 274cdba753f9716c67a451c120bcf1032dece222
Author: Jeffrey Vo <[email protected]>
AuthorDate: Thu Aug 14 20:53:42 2025 +1000
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]>
---
datafusion/sqllogictest/src/engines/conversion.rs | 3 ++-
datafusion/sqllogictest/test_files/expr.slt | Bin 34736 -> 34737 bytes
.../sqllogictest/test_files/spark/string/char.slt | Bin 969 -> 970 bytes
3 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/datafusion/sqllogictest/src/engines/conversion.rs
b/datafusion/sqllogictest/src/engines/conversion.rs
index 92ab64059b..de3acbee93 100644
--- a/datafusion/sqllogictest/src/engines/conversion.rs
+++ b/datafusion/sqllogictest/src/engines/conversion.rs
@@ -35,7 +35,8 @@ pub(crate) fn varchar_to_str(value: &str) -> String {
if value.is_empty() {
"(empty)".to_string()
} else {
- value.trim_end_matches('\n').to_string()
+ // Escape nulls so that github renders them correctly in the webui
+ value.trim_end_matches('\n').replace("\u{0000}", "\\0")
}
}
diff --git a/datafusion/sqllogictest/test_files/expr.slt
b/datafusion/sqllogictest/test_files/expr.slt
index f0bf5d76e8..eeea3cd39a 100644
Binary files a/datafusion/sqllogictest/test_files/expr.slt and
b/datafusion/sqllogictest/test_files/expr.slt differ
diff --git a/datafusion/sqllogictest/test_files/spark/string/char.slt
b/datafusion/sqllogictest/test_files/spark/string/char.slt
index abf0c7076a..299e2a0413 100644
Binary files a/datafusion/sqllogictest/test_files/spark/string/char.slt and
b/datafusion/sqllogictest/test_files/spark/string/char.slt differ
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]