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
COALESCE returns a NullInt instead of an int in JOIN #1096
If I have COALESCE(connected_clients, 0), sqlc generates a NullInt64 for this instead of an int64. This is a regression from 1.7.0. (At least I can fix it by casting to the right value).
SELECT stats.*,
COALESCE(device_query.device_count, 0) AS device_count
FROM stats
LEFT JOIN device_query ON device_query.controller = stats.controller;
Activity
kyleconroy commentedon Aug 11, 2021
@kevinburkemeter What is the type of
connected_clients?kevinburke1 commentedon Aug 11, 2021
Here are some examples
Produces this diff when run on tip
kevinburke1 commentedon Aug 11, 2021
even simpler
[-]COALESCE returns a NullInt instead of an int[/-][+]COALESCE returns a NullInt instead of an int in JOIN[/+]