Skip to content

Correct two values in the shared test data - #916

Open
phdoerfler wants to merge 2 commits into
typelevel:mainfrom
phdoerfler:fix/shared-test-data-values
Open

Correct two values in the shared test data#916
phdoerfler wants to merge 2 commits into
typelevel:mainfrom
phdoerfler:fix/shared-test-data-values

Conversation

@phdoerfler

@phdoerfler phdoerfler commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

As a follow-up to #912 I noticed two issues.

First, there is a boolean column which is currently not explicitly tagged as such but would benefit from it: testdata/projection/level2.csv's attr. So every dialect gets the string literal 'false', where before #912 Oracle had 'FALSE' and SQL Server had 0. All three databases are fine with that and parse the boolean correctly. So far, that is. With the advent of SQLite this is no longer good enough: SQLite gives such a column INTEGER affinity and keeps 'true' as text, reading it back as false. MySQL's BOOLEAN is a TINYINT(1), where 'true' is an error under strict mode. Also, coalesce/cb.csv already tags its boolean column. projection was the only one that did not.

Second, before #912 the unions dataset held slightly different data on SQL Server and Oracle than on Postgres. Those two wrote a real NULL into collections.itema/itemb, while Postgres's COPY block set NULL AS '', so only an empty field became NULL there and the word null was stored as a four-character string. #912 shared the Postgres spelling, which changed the value on the other two. Writing \N gives all three a real NULL, which is what the fixture means: the row is not that variant of the union.

This PR corrects both.

One more difference from before #912 turned up on the way: San Marino's headofstate was '' on SQL Server, and NULL on Postgres and Oracle. It is NULL everywhere now.

Postgres's COPY block set NULL AS '', so the word null was a four-character string there and the CSV kept that spelling.
Oracle spelled it 'FALSE' and SQL Server 0 before the CSVs, and tagging the column brings both back.
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

Successfully merging this pull request may close these issues.

1 participant