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

Minor: Document how to test for trailing whitespace in slt / sqllogictests #13215

Merged
merged 5 commits into from
Nov 8, 2024

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Nov 1, 2024

Which issue does this PR close?

Rationale for this change

@findepi figured out a good way to test for trailing spaces, let's put that in the user documentation as suggested by #13197 (comment)

What changes are included in this PR?

Add docs and slt examples

Are these changes tested?

Yes

Are there any user-facing changes?

docs and tests, no functional changes

@alamb alamb changed the title Minor: Document how to test for trailing whitespace Minor: Document how to test for trailing whitespace in slt / sqllogictests Nov 1, 2024
@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Nov 1, 2024
@alamb alamb added the development-process Related to development process of DataFusion label Nov 1, 2024
Copy link
Member

@findepi findepi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

datafusion/sqllogictest/README.md Outdated Show resolved Hide resolved
```

To test trailing whitespace, project additional non-whitespace column on the
right. For example, by selecting `'XX'` after the column of interest, the test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use | to be consistent with what you added . I will update the PR

@github-actions github-actions bot removed the development-process Related to development process of DataFusion label Nov 4, 2024
Copy link
Contributor

@jonathanc-n jonathanc-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lgtm!

@jonahgao jonahgao merged commit 545976f into apache:main Nov 8, 2024
24 checks passed
@alamb alamb deleted the alamb/docs_on_slt branch November 8, 2024 13:05
jayzhan211 pushed a commit to jayzhan211/datafusion that referenced this pull request Nov 12, 2024
…ictests (apache#13215)

* Minor: Document how to test for trailing whitespace

* Apply suggestions from code review

Co-authored-by: Piotr Findeisen <[email protected]>

* Use `|` for consistency

---------

Co-authored-by: Piotr Findeisen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants