René's URL Explorer Experiment


Title: fix(compiler): handle subqueries in JOIN nullability inference by kitagry · Pull Request #4280 · sqlc-dev/sqlc · GitHub

Open Graph Title: fix(compiler): handle subqueries in JOIN nullability inference by kitagry · Pull Request #4280 · sqlc-dev/sqlc

X Title: fix(compiler): handle subqueries in JOIN nullability inference by kitagry · Pull Request #4280 · sqlc-dev/sqlc

Description: Fixed incorrect nullability inference when using subqueries with LEFT/RIGHT/FULL OUTER JOINs. When using subqueries in JOINs like: SELECT * FROM a LEFT JOIN (SELECT * FROM b) si ON si.a_id = a.id Columns from subquery 'si' were incorrectly treated as NOT NULL. Root cause: The isTableRequired() function did not handle *ast.RangeSubselect (subquery ranges). Solution: Added *ast.RangeSubselect case to isTableRequired() Match subqueries by their alias names Verified all JOIN types (LEFT/RIGHT/FULL OUTER) work correctly Test coverage: Added internal/endtoend/testdata/join_left_subquery/postgresql/ Covers LEFT JOIN, RIGHT JOIN, and FULL OUTER JOIN patterns Fixes #4117

Open Graph Description: Fixed incorrect nullability inference when using subqueries with LEFT/RIGHT/FULL OUTER JOINs. When using subqueries in JOINs like: SELECT * FROM a LEFT JOIN (SELECT * FROM b) si ON si.a_id = a.id C...

X Description: Fixed incorrect nullability inference when using subqueries with LEFT/RIGHT/FULL OUTER JOINs. When using subqueries in JOINs like: SELECT * FROM a LEFT JOIN (SELECT * FROM b) si ON si.a_id = a.id C...

Opengraph URL: https://github.com/sqlc-dev/sqlc/pull/4280

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:79cd0926-ada7-4427-89c5-a430b32f5c46
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD8A4:16EED3:22AEB38:2C1E82A:6B018103
html-safe-nonce6a5cacca5b983ce51b6e6f512359ab6d5d2a10abb8ce3873aa937aca4e61f2fc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEE0OjE2RUVEMzoyMkFFQjM4OjJDMUU4MkE6NkIwMTgxMDMiLCJ2aXNpdG9yX2lkIjoiNTcwMDA3NTE0MTk2ODM2NjExIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1e54f1148138047da93d4af293befb7dfdfcba6b97de27b5aa67304be0398234
hovercard-subject-tagpull_request:3214920351
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/sqlc-dev/sqlc/pull/4280/files
twitter:imagehttps://avatars.githubusercontent.com/u/21323222?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/21323222?s=400&v=4
og:image:altFixed incorrect nullability inference when using subqueries with LEFT/RIGHT/FULL OUTER JOINs. When using subqueries in JOINs like: SELECT * FROM a LEFT JOIN (SELECT * FROM b) si ON si.a_id = a.id C...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git
octolytics-dimension-user_id136738596
octolytics-dimension-user_loginsqlc-dev
octolytics-dimension-repository_id193160679
octolytics-dimension-repository_nwosqlc-dev/sqlc
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id193160679
octolytics-dimension-repository_network_root_nwosqlc-dev/sqlc
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/sqlc-dev/sqlc/pull/4280/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fpull%2F4280%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fpull%2F4280%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=sqlc-dev%2Fsqlc
Reloadhttps://github.com/sqlc-dev/sqlc/pull/4280/files
Reloadhttps://github.com/sqlc-dev/sqlc/pull/4280/files
Reloadhttps://github.com/sqlc-dev/sqlc/pull/4280/files
sqlc-devhttps://github.com/sqlc-dev
sqlchttps://github.com/sqlc-dev/sqlc
Codehttps://github.com/sqlc-dev/sqlc
Issues600 (600)https://github.com/sqlc-dev/sqlc/issues
Pull requests132 (132)https://github.com/sqlc-dev/sqlc/pulls
Discussionshttps://github.com/sqlc-dev/sqlc/discussions
Actionshttps://github.com/sqlc-dev/sqlc/actions
Projectshttps://github.com/sqlc-dev/sqlc/projects
Security and qualityhttps://github.com/sqlc-dev/sqlc/security
Insightshttps://github.com/sqlc-dev/sqlc/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fsqlc-dev%2Fsqlc%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc%2Fissues%2Fnew%2Fchoose
kitagryhttps://github.com/kitagry
sqlc-dev:mainhttps://github.com/sqlc-dev/sqlc/tree/main
kitagry:fix-4117https://github.com/kitagry/sqlc/tree/fix-4117
Conversation 0 https://github.com/sqlc-dev/sqlc/pull/4280
Commits 1 https://github.com/sqlc-dev/sqlc/pull/4280/commits
Checks 12 https://github.com/sqlc-dev/sqlc/pull/4280/checks
Files changed https://github.com/sqlc-dev/sqlc/pull/4280/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/4280/files
fix(compiler): handle subqueries in JOIN nullability inference https://github.com/sqlc-dev/sqlc/pull/4280/files#top
Show all changes 1 commit https://github.com/sqlc-dev/sqlc/pull/4280/files
be44a57 fix(compiler): handle subqueries in JOIN nullability inference kitagry Jan 27, 2026 https://github.com/sqlc-dev/sqlc/pull/4280/commits/be44a577a518821375d87d3ddfa4a9fb29e86750
Clear filters https://github.com/sqlc-dev/sqlc/pull/4280/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/4280/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/4280/files
output_columns.go https://github.com/sqlc-dev/sqlc/pull/4280/files#diff-10352986f0bc3f9bd887ba90e50c3ff0d93f284b24a9a8c059f1f1bc0aaba061
db.go https://github.com/sqlc-dev/sqlc/pull/4280/files#diff-1d29e27cbdb012e3c674768d1c5b2f3a3a8b221d89afa0fb5235b16d303baf95
models.go https://github.com/sqlc-dev/sqlc/pull/4280/files#diff-ce21c559f27dcfd7e2557ed023ec5264818393c9541962175076e5f305f96979
query.sql.go https://github.com/sqlc-dev/sqlc/pull/4280/files#diff-b2ce731bbf877b40b7aa483ae850d2f2495d1651c89195154423a2749dd4cbf4
query.sql https://github.com/sqlc-dev/sqlc/pull/4280/files#diff-818f1a3854a533da1956b38cfc4db63f0ff7c790b7312fe8a424bbe765a33184
schema.sql https://github.com/sqlc-dev/sqlc/pull/4280/files#diff-06a4b346093d47e8aa909013a9d2456b360d3c3053ac58137669a02a11454505
sqlc.json https://github.com/sqlc-dev/sqlc/pull/4280/files#diff-e39719c894a9d363caafbb6997567be4135af6e2d95b1309b0d2b59261e7cb3a
internal/compiler/output_columns.gohttps://github.com/sqlc-dev/sqlc/pull/4280/files#diff-10352986f0bc3f9bd887ba90e50c3ff0d93f284b24a9a8c059f1f1bc0aaba061
View file https://github.com/sqlc-dev/sqlc/blob/be44a577a518821375d87d3ddfa4a9fb29e86750/internal/compiler/output_columns.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/4280/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/4280/files#diff-10352986f0bc3f9bd887ba90e50c3ff0d93f284b24a9a8c059f1f1bc0aaba061
https://github.com/sqlc-dev/sqlc/pull/4280/files#diff-10352986f0bc3f9bd887ba90e50c3ff0d93f284b24a9a8c059f1f1bc0aaba061
internal/endtoend/testdata/join_left_subquery/postgresql/go/db.gohttps://github.com/sqlc-dev/sqlc/pull/4280/files#diff-1d29e27cbdb012e3c674768d1c5b2f3a3a8b221d89afa0fb5235b16d303baf95
View file https://github.com/sqlc-dev/sqlc/blob/be44a577a518821375d87d3ddfa4a9fb29e86750/internal/endtoend/testdata/join_left_subquery/postgresql/go/db.go
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/4280/files
internal/endtoend/testdata/join_left_subquery/postgresql/go/models.gohttps://github.com/sqlc-dev/sqlc/pull/4280/files#diff-ce21c559f27dcfd7e2557ed023ec5264818393c9541962175076e5f305f96979
View file https://github.com/sqlc-dev/sqlc/blob/be44a577a518821375d87d3ddfa4a9fb29e86750/internal/endtoend/testdata/join_left_subquery/postgresql/go/models.go
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/4280/files
internal/endtoend/testdata/join_left_subquery/postgresql/go/query.sql.gohttps://github.com/sqlc-dev/sqlc/pull/4280/files#diff-b2ce731bbf877b40b7aa483ae850d2f2495d1651c89195154423a2749dd4cbf4
View file https://github.com/sqlc-dev/sqlc/blob/be44a577a518821375d87d3ddfa4a9fb29e86750/internal/endtoend/testdata/join_left_subquery/postgresql/go/query.sql.go
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/4280/files
internal/endtoend/testdata/join_left_subquery/postgresql/query.sqlhttps://github.com/sqlc-dev/sqlc/pull/4280/files#diff-818f1a3854a533da1956b38cfc4db63f0ff7c790b7312fe8a424bbe765a33184
View file https://github.com/sqlc-dev/sqlc/blob/be44a577a518821375d87d3ddfa4a9fb29e86750/internal/endtoend/testdata/join_left_subquery/postgresql/query.sql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/4280/{{ revealButtonHref }}
internal/endtoend/testdata/join_left_subquery/postgresql/schema.sqlhttps://github.com/sqlc-dev/sqlc/pull/4280/files#diff-06a4b346093d47e8aa909013a9d2456b360d3c3053ac58137669a02a11454505
View file https://github.com/sqlc-dev/sqlc/blob/be44a577a518821375d87d3ddfa4a9fb29e86750/internal/endtoend/testdata/join_left_subquery/postgresql/schema.sql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/4280/{{ revealButtonHref }}
internal/endtoend/testdata/join_left_subquery/postgresql/sqlc.jsonhttps://github.com/sqlc-dev/sqlc/pull/4280/files#diff-e39719c894a9d363caafbb6997567be4135af6e2d95b1309b0d2b59261e7cb3a
View file https://github.com/sqlc-dev/sqlc/blob/be44a577a518821375d87d3ddfa4a9fb29e86750/internal/endtoend/testdata/join_left_subquery/postgresql/sqlc.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/4280/{{ revealButtonHref }}
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/4280/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.