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

Implement null / empty string handling for sqllogictest #4500

Closed
Tracked by #4460
alamb opened this issue Dec 4, 2022 · 1 comment · Fixed by #4547
Closed
Tracked by #4460

Implement null / empty string handling for sqllogictest #4500

alamb opened this issue Dec 4, 2022 · 1 comment · Fixed by #4547
Assignees
Labels
sqllogictest SQL Logic Tests (.slt)

Comments

@alamb
Copy link
Contributor

alamb commented Dec 4, 2022

As explained in https://duckdb.org/dev/sqllogictest/result_verification#null-values-and-empty-strings

Empty lines have special significance for the SQLLogic test runner: they signify an end of the current statement or query. For that reason, empty strings and NULL values have special syntax that must be used in result verification. NULL values should use the string NULL, and empty strings should use the string (empty), e.g.:

query II
SELECT NULL, ''
----
NULL
(empty)

The goal of this ticket is to make the DataFusion sqlogictest framework do the same thing

@alamb alamb mentioned this issue Dec 4, 2022
28 tasks
@alamb alamb self-assigned this Dec 4, 2022
@alamb
Copy link
Contributor Author

alamb commented Dec 4, 2022

Currently the sqllogictest framework uses the arrow csv writer

This we would need some way to control how NULLs are printed in the CSV writer in order to change the display of null values to "NULL" -- I will attempt to upstream that.

Rewriting "" to (empty) is possible now

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 a pull request may close this issue.

2 participants