Title: Unknown node type *ast.SetOprStmt · Issue #2260 · sqlc-dev/sqlc · GitHub
Open Graph Title: Unknown node type *ast.SetOprStmt · Issue #2260 · sqlc-dev/sqlc
X Title: Unknown node type *ast.SetOprStmt · Issue #2260 · sqlc-dev/sqlc
Description: Version 1.17.2 What happened? sqlc fails to generate on MySQL when there is a UNION inside a subquery that we're selecting from. Relevant log output sqlc generate failed. 2023/05/04 09:31:21 dolphin.convert: Unknown node type *ast.SetOpr...
Open Graph Description: Version 1.17.2 What happened? sqlc fails to generate on MySQL when there is a UNION inside a subquery that we're selecting from. Relevant log output sqlc generate failed. 2023/05/04 09:31:21 dolphi...
X Description: Version 1.17.2 What happened? sqlc fails to generate on MySQL when there is a UNION inside a subquery that we're selecting from. Relevant log output sqlc generate failed. 2023/05/04 09:31:21 do...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/2260
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unknown node type *ast.SetOprStmt","articleBody":"### Version\n\n1.17.2\n\n### What happened?\n\nsqlc fails to generate on MySQL when there is a UNION inside a subquery that we're selecting from.\r\n\n\n### Relevant log output\n\n```shell\nsqlc generate failed.\r\n2023/05/04 09:31:21 dolphin.convert: Unknown node type *ast.SetOprStmt\r\n2023/05/04 09:31:21 dolphin.convert: Unknown node type *ast.SetOprStmt\r\n# package db\r\nquery.sql:9:1: edited query syntax is invalid: syntax error near \"FROM (\"\n```\n\n\n### Database schema\n\n_No response_\n\n### SQL queries\n\n```sql\n-- name: TestSubqueryUnion :many\r\nSELECT tmp.* FROM (\r\n SELECT * FROM authors\r\n UNION\r\n SELECT * FROM authors\r\n) tmp LIMIT 5;\n```\n\n\n### Configuration\n\n_No response_\n\n### Playground URL\n\nhttps://play.sqlc.dev/p/4963c8a8ba696143e0a564fa4c164c51c54d9460b5494c32ddc2c0269a20f866\n\n### What operating system are you using?\n\n_No response_\n\n### What database engines are you using?\n\nMySQL\n\n### What type of code are you generating?\n\nGo","author":{"url":"https://github.com/dansimau","@type":"Person","name":"dansimau"},"datePublished":"2023-05-04T09:35:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2260/sqlc/issues/2260"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:22cc66fc-a170-2cba-bf87-82dd39ace6d4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E914:16C3D3:6AFCE6F:961C61A:6A504CA4 |
| html-safe-nonce | 77ce474c1ec8492f11eff198742e76d52b36d10d5eb355afa059662d4ba055e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTE0OjE2QzNEMzo2QUZDRTZGOjk2MUM2MUE6NkE1MDRDQTQiLCJ2aXNpdG9yX2lkIjoiODQ3MTYyNzUwMzQxMjIwMjY2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2440ea8d6b49e5442327e3ce5da99358ed02476c1522d2b0c4331d480125f7a4 |
| hovercard-subject-tag | issue:1695639090 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlc-dev/sqlc/2260/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f8c7c4de317d2a4d29b3ea67a64381b1958ef304b909e9f4c354c6e0c2571a49/sqlc-dev/sqlc/issues/2260 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f8c7c4de317d2a4d29b3ea67a64381b1958ef304b909e9f4c354c6e0c2571a49/sqlc-dev/sqlc/issues/2260 |
| og:image:alt | Version 1.17.2 What happened? sqlc fails to generate on MySQL when there is a UNION inside a subquery that we're selecting from. Relevant log output sqlc generate failed. 2023/05/04 09:31:21 dolphi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dansimau |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git |
| octolytics-dimension-user_id | 136738596 |
| octolytics-dimension-user_login | sqlc-dev |
| octolytics-dimension-repository_id | 193160679 |
| octolytics-dimension-repository_nwo | sqlc-dev/sqlc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193160679 |
| octolytics-dimension-repository_network_root_nwo | sqlc-dev/sqlc |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5741a45fe07e5f377d0d4c524a92e3056acc51bb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width