Background
The three backends were written years apart and their edge-case behavior drifted (see the sibling correctness issues: PG empty tuples, PG/MySQL/BQ identifier escaping, MySQL Infinity). Nothing today pins down "what all backends must agree on" — each test file only tests its own backend's status quo.
Prerequisites
- The individual correctness fixes should land first (PG empty tuples, PG identifier quoting, MySQL/BQ backtick escaping, MySQL Infinity) — this issue locks in their outcomes. Check which are closed before starting.
Task
Add one cross-backend test file (e.g. test/consistency_test.rb, test-unit like the rest) that runs a shared matrix of edge cases against all three backends and asserts either the common behavior or the documented, intentional divergence:
| Case |
Expectation |
nil value in a tuple |
SQL NULL in output, all backends |
column with only nils, no explicit type |
ReasonlessTypeError (or documented alternative), all backends |
| empty tuples + explicit types |
valid 0-row relation, all backends |
| empty tuples, no types |
TypeNotFoundError, all backends |
| mixed types in a column |
ReasonlessTypeError, all backends |
| single column |
valid output (BQ adds dummy column) |
| quote character in column name |
correctly escaped per backend |
| quote character in string value |
correctly escaped per backend |
Float::INFINITY / NAN |
per-backend documented behavior (PG literal, BQ handling, MySQL error) |
BigDecimal round-trip precision |
value survives to the literal without float truncation |
Acceptance criteria
Verification
bundle exec rake green locally and in CI
- The matrix table in this issue is fully mirrored by test cases (reviewer can diff table rows against test
data entries)
Background
The three backends were written years apart and their edge-case behavior drifted (see the sibling correctness issues: PG empty tuples, PG/MySQL/BQ identifier escaping, MySQL Infinity). Nothing today pins down "what all backends must agree on" — each test file only tests its own backend's status quo.
Prerequisites
Task
Add one cross-backend test file (e.g.
test/consistency_test.rb, test-unit like the rest) that runs a shared matrix of edge cases against all three backends and asserts either the common behavior or the documented, intentional divergence:nilvalue in a tuplenils, no explicit typeReasonlessTypeError(or documented alternative), all backendsTypeNotFoundError, all backendsReasonlessTypeError, all backendsFloat::INFINITY/NANBigDecimalround-trip precisionAcceptance criteria
bundle exec rakeruns the new file via the existing default task glob (test/*_test.rb)Verification
bundle exec rakegreen locally and in CIdataentries)