Repository navigation
fix(runtime): sort nulls last ascending on every engine - #468
Merged
Merged
Conversation
…g, on every engine Nulls sort as larger than any value (Postgres's default) in all five ports. SQLite and MySQL sorted output changes for columns with nulls.
…e claim in fixtures/persistence-conformance/README.md: it said engines disagree on null sort order and pointed nowhere. It now says nulls sort the same in every port and links to docs/features/api-contract.md#null-ordering. CHANGELOG.md, docs/features/api-contract.md, docs/features/reporting.md and fixtures/api-contract-conformance/report/README.md were already updated by the change and checked. Remaining docs that mention NULLS LAST (migrations-and-drift.md, view DDL) describe projection view DDL, which this change did not alter. Edit left uncommitted.
# Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
?sort=now puts nulls last on ASC and first on DESC in all five ports. Postgres output is unchanged. SQLite and MySQL sorted output changes for columns with nulls. NativeNULLS LAST/NULLS FIRSTis used on Postgres and SQLite (TypeScript Drizzle and Kysely drivers, JavaPostgresDriver/SQLiteDriver, PythonDialect.order_term). MySQL uses a leadingcol IS NULLkey. Generated C# routes and Kotlin controller sort helpers follow the same rule.SELECT DISTINCTin the Java OMDB driver skips the null key, since those engines reject ORDER BY items outside the select list.report/scenariosort-null-orderingand updates the sort-on-boolean and sort-on-defaulted scenarios. Adds JavaOrderTermNullsTestand Python/TypeScript dialect and filter-parser tests. Docs and CHANGELOG describe the null-ordering rule (docs/features/api-contract.md#null-ordering).Validation
ci_mode: local) ran the full multi-port regression: TypeScript, C#, Java, Kotlin and Python conformance and integration lanes all passed.sort-null-orderingpasses on SQLite, Postgres and MySQL.SELECT DISTINCTguard (with a unit test), a CLI typecheck exclusion for concurrent scratch fixtures, and a regenerated showcase C# route file.