alamb commented on code in PR #13197:
URL: https://github.com/apache/datafusion/pull/13197#discussion_r1824887099


##########
datafusion/sqllogictest/bin/sqllogictests.rs:
##########
@@ -39,6 +40,23 @@ pub fn main() -> Result<()> {
         .block_on(run_tests())
 }
 
+fn value_validator(actual: &[Vec<String>], expected: &[String]) -> bool {
+    let expected = expected
+        .iter()
+        // Trailing whitespace from lines in SLT will typically be removed, 
but do not fail if it is not
+        // If particular test wants to cover trailing whitespace on a value,
+        // it should project additional non-whitespace column on the right.
+        .map(|s| s.trim_end().to_owned())
+        .collect::<Vec<_>>();
+    let actual = actual
+        .iter()
+        .map(|strs| strs.iter().join(" "))

Review Comment:
   I am not quite sure what you are suggesting here



##########
datafusion/sqllogictest/bin/sqllogictests.rs:
##########
@@ -39,6 +40,23 @@ pub fn main() -> Result<()> {
         .block_on(run_tests())
 }
 
+fn value_validator(actual: &[Vec<String>], expected: &[String]) -> bool {
+    let expected = expected
+        .iter()
+        // Trailing whitespace from lines in SLT will typically be removed, 
but do not fail if it is not
+        // If particular test wants to cover trailing whitespace on a value,

Review Comment:
   This is probably a good thing to add in the user documentation (aka 
https://github.com/apache/datafusion/blob/main/datafusion/sqllogictest/README.md)
   
   I think it would be hard to find here for someone writing sqllogictests



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to