You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
duckdb: columns from the right side of a LEFT JOIN are generated as non-nullable #4711
main at commit 3ad8b20 (2026-10-23). sqlc version prints v1.31.1.
What happened?
A column from the right side of a LEFT JOIN keeps the NOT NULL of its table definition. i.status below is generated as Status string, so scanning a player with no injury row fails at runtime when it tries to scan NULL into a string.
Expected: Status sql.NullString, as the PostgreSQL engine generates for a LEFT JOIN.
Workaround: COALESCE(i.status, '') AS status.
Database schema
CREATETABLEplayers (id BIGINTNOT NULL, name VARCHARNOT NULL);
CREATETABLEinjuries (player_id BIGINTNOT NULL, status VARCHARNOT NULL);
SQL queries
-- name: ListPlayers :manySELECTp.id, p.name, i.statusFROM players p LEFT JOIN injuries i ONi.player_id=p.id;
Activity