{"action":"created","issue":{"url":"https://api.github.com/repos/querydsl/querydsl/issues/1898","repository_url":"https://api.github.com/repos/querydsl/querydsl","labels_url":"https://api.github.com/repos/querydsl/querydsl/issues/1898/labels{/name}","comments_url":"https://api.github.com/repos/querydsl/querydsl/issues/1898/comments","events_url":"https://api.github.com/repos/querydsl/querydsl/issues/1898/events","html_url":"https://github.com/querydsl/querydsl/issues/1898","id":156712115,"number":1898,"title":"Coalesce using UNION keyword instead of a comma","user":{"login":"robertandrewbain","id":3799239,"avatar_url":"https://avatars.githubusercontent.com/u/3799239?v=3","gravatar_id":"","url":"https://api.github.com/users/robertandrewbain","html_url":"https://github.com/robertandrewbain","followers_url":"https://api.github.com/users/robertandrewbain/followers","following_url":"https://api.github.com/users/robertandrewbain/following{/other_user}","gists_url":"https://api.github.com/users/robertandrewbain/gists{/gist_id}","starred_url":"https://api.github.com/users/robertandrewbain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertandrewbain/subscriptions","organizations_url":"https://api.github.com/users/robertandrewbain/orgs","repos_url":"https://api.github.com/users/robertandrewbain/repos","events_url":"https://api.github.com/users/robertandrewbain/events{/privacy}","received_events_url":"https://api.github.com/users/robertandrewbain/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/querydsl/querydsl/labels/bug","name":"bug","color":"e10c02"},{"url":"https://api.github.com/repos/querydsl/querydsl/labels/progress","name":"progress","color":"d7e102"}],"state":"closed","locked":false,"assignee":{"login":"robertandrewbain","id":3799239,"avatar_url":"https://avatars.githubusercontent.com/u/3799239?v=3","gravatar_id":"","url":"https://api.github.com/users/robertandrewbain","html_url":"https://github.com/robertandrewbain","followers_url":"https://api.github.com/users/robertandrewbain/followers","following_url":"https://api.github.com/users/robertandrewbain/following{/other_user}","gists_url":"https://api.github.com/users/robertandrewbain/gists{/gist_id}","starred_url":"https://api.github.com/users/robertandrewbain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertandrewbain/subscriptions","organizations_url":"https://api.github.com/users/robertandrewbain/orgs","repos_url":"https://api.github.com/users/robertandrewbain/repos","events_url":"https://api.github.com/users/robertandrewbain/events{/privacy}","received_events_url":"https://api.github.com/users/robertandrewbain/received_events","type":"User","site_admin":false},"assignees":[{"login":"robertandrewbain","id":3799239,"avatar_url":"https://avatars.githubusercontent.com/u/3799239?v=3","gravatar_id":"","url":"https://api.github.com/users/robertandrewbain","html_url":"https://github.com/robertandrewbain","followers_url":"https://api.github.com/users/robertandrewbain/followers","following_url":"https://api.github.com/users/robertandrewbain/following{/other_user}","gists_url":"https://api.github.com/users/robertandrewbain/gists{/gist_id}","starred_url":"https://api.github.com/users/robertandrewbain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertandrewbain/subscriptions","organizations_url":"https://api.github.com/users/robertandrewbain/orgs","repos_url":"https://api.github.com/users/robertandrewbain/repos","events_url":"https://api.github.com/users/robertandrewbain/events{/privacy}","received_events_url":"https://api.github.com/users/robertandrewbain/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-05-25T10:09:15Z","updated_at":"2016-06-28T15:32:01Z","closed_at":"2016-06-28T15:32:01Z","body":"The following code `new Coalesce<>(some SQLQuery<BigDecimal>, Expressions.constant(BigDecimal.ZERO)).as(SOME_COLUMN_ALIAS)` will generate the following SQL `coalesce(<some query> union 0)` when it should generate `coalesce(<some query, 0)`. This bug has been introduced between 4.0.4 and 4.1.1.\r\n\r\n**Update:** tested in 4.0.9 and bug not present. Tested in 4.1.0 and bug is present. Bug introduced in 4.1.0.\r\n\r\n**Update:** I think this is caused by #1805 changes to `querydsl-sql/src/main/java/com/querydsl/sql/SQLSerializer.java`. https://github.com/querydsl/querydsl/pull/1805/files#diff-abdf9237fdabf083adb006f87913f4deR893"},"comment":{"url":"https://api.github.com/repos/querydsl/querydsl/issues/comments/229086632","html_url":"https://github.com/querydsl/querydsl/issues/1898#issuecomment-229086632","issue_url":"https://api.github.com/repos/querydsl/querydsl/issues/1898","id":229086632,"user":{"login":"Shredder121","id":4105066,"avatar_url":"https://avatars.githubusercontent.com/u/4105066?v=3","gravatar_id":"","url":"https://api.github.com/users/Shredder121","html_url":"https://github.com/Shredder121","followers_url":"https://api.github.com/users/Shredder121/followers","following_url":"https://api.github.com/users/Shredder121/following{/other_user}","gists_url":"https://api.github.com/users/Shredder121/gists{/gist_id}","starred_url":"https://api.github.com/users/Shredder121/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shredder121/subscriptions","organizations_url":"https://api.github.com/users/Shredder121/orgs","repos_url":"https://api.github.com/users/Shredder121/repos","events_url":"https://api.github.com/users/Shredder121/events{/privacy}","received_events_url":"https://api.github.com/users/Shredder121/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T15:32:01Z","updated_at":"2016-06-28T15:32:01Z","body":"Fixed in #1900."}}
{"actor":{"display_login":"Shredder121"}}