René's URL Explorer Experiment


Title: [FEATURE] OData push-down: $select strips columns used only in WHERE/ORDER BY, so the client-side filter silently drops all rows · Issue #682 · stackql/stackql · GitHub

Open Graph Title: [FEATURE] OData push-down: $select strips columns used only in WHERE/ORDER BY, so the client-side filter silently drops all rows · Issue #682 · stackql/stackql

X Title: [FEATURE] OData push-down: $select strips columns used only in WHERE/ORDER BY, so the client-side filter silently drops all rows · Issue #682 · stackql/stackql

Description: Summary When a column appears in WHERE (or ORDER BY) but not in the SELECT list, the OData query-option push-down emits $select with only the projected columns and drops the predicate column from the upstream response. Because push-down ...

Open Graph Description: Summary When a column appears in WHERE (or ORDER BY) but not in the SELECT list, the OData query-option push-down emits $select with only the projected columns and drops the predicate column from t...

X Description: Summary When a column appears in WHERE (or ORDER BY) but not in the SELECT list, the OData query-option push-down emits $select with only the projected columns and drops the predicate column from t...

Opengraph URL: https://github.com/stackql/stackql/issues/682

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FEATURE] OData push-down: $select strips columns used only in WHERE/ORDER BY, so the client-side filter silently drops all rows","articleBody":"## Summary\n\nWhen a column appears in `WHERE` (or `ORDER BY`) but not in the `SELECT` list, the\nOData query-option push-down emits `$select` with only the projected columns and\ndrops the predicate column from the upstream response. Because push-down keeps the\nclient-side `WHERE` authoritative and re-applies it locally, the predicate column is\nnow missing from every row, the filter matches nothing, and the query returns **zero\nrows despite an HTTP 200 carrying matching data**. It fails silently.\n\n## Repro\n\nProvider: `entra_id` (Microsoft Graph), run with `--http.log.enabled`.\n\n~~~sql\nSELECT id, displayName FROM entra_id.users.users\nWHERE userType = 'Member';\n~~~\n\nOutgoing request — `$select` has no `userType`:\n\n~~~\nhttp request url: 'https://graph.microsoft.com/v1.0/users?$filter=userType eq 'Member'\u0026$select=id,displayName', method: 'GET'\n~~~\n\nGraph returns `200` with 3 matching rows (only `id`,`displayName` — no `userType`).\nFinal result set is empty:\n\n~~~\n|----|-------------|\n| id | displayName |\n|----|-------------|\n~~~\n\nThe 3 rows were discarded by the client-side re-filter because `userType` is absent\nfrom the response. Adding the predicate column to the projection confirms the cause\n(returns the 3 rows):\n\n~~~sql\nSELECT id, displayName, userType FROM entra_id.users.users\nWHERE userType = 'Member';   -- $select=id,displayName,userType\n~~~\n\n## Root cause\n\n`internal/stackql/pushdown/pushdown.go`, `buildPushdownIntent`: the projection placed\nin the `PushdownIntent` is taken from the `SELECT` list only\n(`extractProjectionAndCount(sel.SelectExprs)`). The `WHERE`/`ORDER BY` columns are\ncollected separately (for `$filter`/`$orderby`) and never folded into the projection,\nso the `$select` any-sdk renders strips them.\n\nThe wire request itself is valid OData — Graph filters server-side and projects\ncorrectly. The defect is that stackql re-applies `WHERE`/`ORDER BY` **client-side**\nand the fetched rows no longer carry the needed column. That client-side dependency\nis knowledge only stackql has, so the fix belongs here.\n\n## Fix\n\nIn `buildPushdownIntent`, set the intent projection to the union of the SELECT,\npredicate, and order-by columns:\n\n~~~\nprojection = SELECT-cols ∪ WHERE-cols ∪ ORDER BY-cols\n~~~\n\nThis affects only the pushed `$select`; the SQL output projection is unchanged (still\njust the `SELECT` list, so `SELECT id, displayName ... WHERE userType = ...` still\noutputs two columns). Guard: no-op when the projection is empty — `SELECT *` pushes no\n`$select`, so the bug cannot occur there.\n\n## Tests\n\nAdd push-down cases against the no-auth `stackql_native_test.odata.people` mock:\n\n- filter on unprojected column: `SELECT name FROM ... WHERE city = 'NYC'` asserts the\n  wire `$select` includes `city` and the result set is non-empty.\n- order-by on unprojected column: `SELECT name FROM ... ORDER BY age` asserts `$select`\n  includes `age`.\n\n## Note\n\nWhichever columns get added to `$select` must satisfy the `select` `supportedColumns`\nallowlist. Where `select`/`filter`/`orderBy` share one allowlist (e.g. entra_id) this\nis automatic; a provider with divergent allowlists could otherwise trip the\nall-or-nothing `$select` gate — worth covering in the fix.\n","author":{"url":"https://github.com/jeffreyaven","@type":"Person","name":"jeffreyaven"},"datePublished":"2026-07-05T22:14:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/682/stackql/issues/682"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:028a9678-5ee7-efad-ef8c-2c513fbc4eec
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD018:9E28B:6710BA:8A9166:6A4D6693
html-safe-nonce81dec7c4fdee1476113221c6b1de4b341c26ee01b7df183eaaa0b590d429a06a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDE4OjlFMjhCOjY3MTBCQTo4QTkxNjY6NkE0RDY2OTMiLCJ2aXNpdG9yX2lkIjoiNTMwNzQ0MjYwMzAxMTk1ODQxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacccb972acb3c00adefa1b6e610f220f3e3da87a1efc40b4c29638ac719ff9d7f9
hovercard-subject-tagissue:4814632637
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/stackql/stackql/682/issue_layout
twitter:imagehttps://opengraph.githubassets.com/739ea4c290803d4f5cdd0abb522a537ac5b536eff3c849c18212f77e2388061f/stackql/stackql/issues/682
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/739ea4c290803d4f5cdd0abb522a537ac5b536eff3c849c18212f77e2388061f/stackql/stackql/issues/682
og:image:altSummary When a column appears in WHERE (or ORDER BY) but not in the SELECT list, the OData query-option push-down emits $select with only the projected columns and drops the predicate column from t...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejeffreyaven
hostnamegithub.com
expected-hostnamegithub.com
None7db3950e3f59095e20a9789440c3dd554efc62d434882ead06ae05b5815605b9
turbo-cache-controlno-preview
go-importgithub.com/stackql/stackql git https://github.com/stackql/stackql.git
octolytics-dimension-user_id95105302
octolytics-dimension-user_loginstackql
octolytics-dimension-repository_id443987542
octolytics-dimension-repository_nwostackql/stackql
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id443987542
octolytics-dimension-repository_network_root_nwostackql/stackql
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecd8f6a71db61d6012a0cbb134be844fdbe9b8a45
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/stackql/stackql/issues/682#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstackql%2Fstackql%2Fissues%2F682
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fstackql%2Fstackql%2Fissues%2F682
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=stackql%2Fstackql
Reloadhttps://github.com/stackql/stackql/issues/682
Reloadhttps://github.com/stackql/stackql/issues/682
Reloadhttps://github.com/stackql/stackql/issues/682
Please reload this pagehttps://github.com/stackql/stackql/issues/682
stackql https://github.com/stackql
stackqlhttps://github.com/stackql/stackql
Please reload this pagehttps://github.com/stackql/stackql/issues/682
Notifications https://github.com/login?return_to=%2Fstackql%2Fstackql
Fork 80 https://github.com/login?return_to=%2Fstackql%2Fstackql
Star 861 https://github.com/login?return_to=%2Fstackql%2Fstackql
Code https://github.com/stackql/stackql
Issues 101 https://github.com/stackql/stackql/issues
Pull requests 1 https://github.com/stackql/stackql/pulls
Discussions https://github.com/stackql/stackql/discussions
Actions https://github.com/stackql/stackql/actions
Projects https://github.com/stackql/stackql/projects
Wiki https://github.com/stackql/stackql/wiki
Security and quality 0 https://github.com/stackql/stackql/security
Insights https://github.com/stackql/stackql/pulse
Code https://github.com/stackql/stackql
Issues https://github.com/stackql/stackql/issues
Pull requests https://github.com/stackql/stackql/pulls
Discussions https://github.com/stackql/stackql/discussions
Actions https://github.com/stackql/stackql/actions
Projects https://github.com/stackql/stackql/projects
Wiki https://github.com/stackql/stackql/wiki
Security and quality https://github.com/stackql/stackql/security
Insights https://github.com/stackql/stackql/pulse
[FEATURE] OData push-down: $select strips columns used only in WHERE/ORDER BY, so the client-side filter silently drops all rowshttps://github.com/stackql/stackql/issues/682#top
https://github.com/jeffreyaven
enhancementNew feature or requesthttps://github.com/stackql/stackql/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/jeffreyaven
jeffreyavenhttps://github.com/jeffreyaven
on Jul 5, 2026https://github.com/stackql/stackql/issues/682#issue-4814632637
jeffreyavenhttps://github.com/jeffreyaven
enhancementNew feature or requesthttps://github.com/stackql/stackql/issues?q=state%3Aopen%20label%3A%22enhancement%22
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.