Skip to content
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

Document how to handle separators #109

Open
xxchan opened this issue Dec 5, 2022 · 2 comments
Open

Document how to handle separators #109

xxchan opened this issue Dec 5, 2022 · 2 comments

Comments

@xxchan
Copy link
Member

xxchan commented Dec 5, 2022

Just checked how sqllogictest variants handle separators in the results:

  • sqlite: each row is one value instead of one row, so spaces are compared, but result cannot contain newline
  • duckdb: tab separated, so spaces are compared, but result cannot contain newline and tab
  • cockroach: compare "normalized rows", so whitespace characters are squashed. e.g., the following test will pass
query ITI
SELECT 1, E'a \t\n b', 2
----
1 a      b 2
@xxchan
Copy link
Member Author

xxchan commented Dec 5, 2022

IIUC currently our behavior is the same as cockroach's. Not exactly, we use String instead of Vec<String> when parsing results. 🤪

I think cockroach's approach makes sense. slt seems not a good place to test things like whitespace characters. But we need to document it in case some users get surprised.

@xxchan
Copy link
Member Author

xxchan commented Oct 10, 2023

BTW, we can add another control directive to tweak the behavior...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant