findepi commented on code in PR #13215:
URL: https://github.com/apache/datafusion/pull/13215#discussion_r1826305494


##########
datafusion/sqllogictest/README.md:
##########
@@ -102,6 +102,39 @@ SELECT * from foo;
 
 Assuming it looks good, check it in!
 
+## Cookbook: Testing for whitespace
+
+The `sqllogictest` runner will automatically strip trailing whitespace, meaning
+it additional effort to verify that trailing whitespace is correctly produced

Review Comment:
   ```suggestion
   The `sqllogictest` runner will automatically strip trailing whitespace, 
meaning
   it requires an additional effort to verify that trailing whitespace is 
correctly produced
   ```



##########
datafusion/sqllogictest/README.md:
##########
@@ -102,6 +102,39 @@ SELECT * from foo;
 
 Assuming it looks good, check it in!
 
+## Cookbook: Testing for whitespace
+
+The `sqllogictest` runner will automatically strip trailing whitespace, meaning
+it additional effort to verify that trailing whitespace is correctly produced
+
+For example, the following test can't distinguish between `Andrew` and `Andrew 
`
+(with trailing space):
+
+```text
+query T
+select substr('Andrew Lamb', 1, 7)
+----
+Andrew
+```
+
+To test trailing whitespace, project additional non-whitespace column on the
+right. For example, by selecting `'XX'` after the column of interest, the test

Review Comment:
   It's any non-whitespace, but we can take opportunity to suggest what we want 
to see in tests.
   What about `'|'` that's used in one test i added, or `'$'` (not non-typical 
for marking end of line)?



-- 
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