{"action":"closed","number":2521,"pull_request":{"url":"https://api.github.com/repos/qgis/QGIS/pulls/2521","id":52229560,"html_url":"https://github.com/qgis/QGIS/pull/2521","diff_url":"https://github.com/qgis/QGIS/pull/2521.diff","patch_url":"https://github.com/qgis/QGIS/pull/2521.patch","issue_url":"https://api.github.com/repos/qgis/QGIS/issues/2521","number":2521,"state":"closed","locked":false,"title":"Handle type conversion failures for compiled expressions","user":{"login":"nyalldawson","id":1829991,"avatar_url":"https://avatars.githubusercontent.com/u/1829991?v=3","gravatar_id":"","url":"https://api.github.com/users/nyalldawson","html_url":"https://github.com/nyalldawson","followers_url":"https://api.github.com/users/nyalldawson/followers","following_url":"https://api.github.com/users/nyalldawson/following{/other_user}","gists_url":"https://api.github.com/users/nyalldawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nyalldawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyalldawson/subscriptions","organizations_url":"https://api.github.com/users/nyalldawson/orgs","repos_url":"https://api.github.com/users/nyalldawson/repos","events_url":"https://api.github.com/users/nyalldawson/events{/privacy}","received_events_url":"https://api.github.com/users/nyalldawson/received_events","type":"User","site_admin":false},"body":"Sometimes an expression can be successfully compiled for the Postgres/Spatialite providers but still fail to be set on the provider. One case is when the type of a field does not match a literal type. QGIS expressions allow this, but Postgres/Spatialite do not (eg, `\"int_field\" in ('1','2','3')` works in QGIS, fails in Postgres). \r\n\r\nTo work around this and provide extra safety for compiled expressions, a \"fallback\" where clause is stored which consists of all where clauses EXCEPT the compiled expression. Then, if the query failed on the provider, the fallback clause is used instead and expression compilation disabled for the iterator.\r\n","created_at":"2015-12-01T08:39:36Z","updated_at":"2015-12-10T10:29:02Z","closed_at":"2015-12-10T10:29:02Z","merged_at":null,"merge_commit_sha":"fa21fd7b619b61dafe7d8aa46794e84a6f19096c","assignee":{"login":"m-kuhn","id":588407,"avatar_url":"https://avatars.githubusercontent.com/u/588407?v=3","gravatar_id":"","url":"https://api.github.com/users/m-kuhn","html_url":"https://github.com/m-kuhn","followers_url":"https://api.github.com/users/m-kuhn/followers","following_url":"https://api.github.com/users/m-kuhn/following{/other_user}","gists_url":"https://api.github.com/users/m-kuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/m-kuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-kuhn/subscriptions","organizations_url":"https://api.github.com/users/m-kuhn/orgs","repos_url":"https://api.github.com/users/m-kuhn/repos","events_url":"https://api.github.com/users/m-kuhn/events{/privacy}","received_events_url":"https://api.github.com/users/m-kuhn/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/qgis/QGIS/pulls/2521/commits","review_comments_url":"https://api.github.com/repos/qgis/QGIS/pulls/2521/comments","review_comment_url":"https://api.github.com/repos/qgis/QGIS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qgis/QGIS/issues/2521/comments","statuses_url":"https://api.github.com/repos/qgis/QGIS/statuses/d8a8e66f67885c2a20d28f46b708fd3165e21553","head":{"label":"nyalldawson:compile_type","ref":"compile_type","sha":"d8a8e66f67885c2a20d28f46b708fd3165e21553","user":{"login":"nyalldawson","id":1829991,"avatar_url":"https://avatars.githubusercontent.com/u/1829991?v=3","gravatar_id":"","url":"https://api.github.com/users/nyalldawson","html_url":"https://github.com/nyalldawson","followers_url":"https://api.github.com/users/nyalldawson/followers","following_url":"https://api.github.com/users/nyalldawson/following{/other_user}","gists_url":"https://api.github.com/users/nyalldawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nyalldawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyalldawson/subscriptions","organizations_url":"https://api.github.com/users/nyalldawson/orgs","repos_url":"https://api.github.com/users/nyalldawson/repos","events_url":"https://api.github.com/users/nyalldawson/events{/privacy}","received_events_url":"https://api.github.com/users/nyalldawson/received_events","type":"User","site_admin":false},"repo":{"id":8490349,"name":"QGIS","full_name":"nyalldawson/QGIS","owner":{"login":"nyalldawson","id":1829991,"avatar_url":"https://avatars.githubusercontent.com/u/1829991?v=3","gravatar_id":"","url":"https://api.github.com/users/nyalldawson","html_url":"https://github.com/nyalldawson","followers_url":"https://api.github.com/users/nyalldawson/followers","following_url":"https://api.github.com/users/nyalldawson/following{/other_user}","gists_url":"https://api.github.com/users/nyalldawson/gists{/gist_id}","starred_url":"https://api.github.com/users/nyalldawson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyalldawson/subscriptions","organizations_url":"https://api.github.com/users/nyalldawson/orgs","repos_url":"https://api.github.com/users/nyalldawson/repos","events_url":"https://api.github.com/users/nyalldawson/events{/privacy}","received_events_url":"https://api.github.com/users/nyalldawson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nyalldawson/QGIS","description":"QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)","fork":true,"url":"https://api.github.com/repos/nyalldawson/QGIS","forks_url":"https://api.github.com/repos/nyalldawson/QGIS/forks","keys_url":"https://api.github.com/repos/nyalldawson/QGIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nyalldawson/QGIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nyalldawson/QGIS/teams","hooks_url":"https://api.github.com/repos/nyalldawson/QGIS/hooks","issue_events_url":"https://api.github.com/repos/nyalldawson/QGIS/issues/events{/number}","events_url":"https://api.github.com/repos/nyalldawson/QGIS/events","assignees_url":"https://api.github.com/repos/nyalldawson/QGIS/assignees{/user}","branches_url":"https://api.github.com/repos/nyalldawson/QGIS/branches{/branch}","tags_url":"https://api.github.com/repos/nyalldawson/QGIS/tags","blobs_url":"https://api.github.com/repos/nyalldawson/QGIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nyalldawson/QGIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nyalldawson/QGIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/nyalldawson/QGIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nyalldawson/QGIS/statuses/{sha}","languages_url":"https://api.github.com/repos/nyalldawson/QGIS/languages","stargazers_url":"https://api.github.com/repos/nyalldawson/QGIS/stargazers","contributors_url":"https://api.github.com/repos/nyalldawson/QGIS/contributors","subscribers_url":"https://api.github.com/repos/nyalldawson/QGIS/subscribers","subscription_url":"https://api.github.com/repos/nyalldawson/QGIS/subscription","commits_url":"https://api.github.com/repos/nyalldawson/QGIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/nyalldawson/QGIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/nyalldawson/QGIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/nyalldawson/QGIS/issues/comments{/number}","contents_url":"https://api.github.com/repos/nyalldawson/QGIS/contents/{+path}","compare_url":"https://api.github.com/repos/nyalldawson/QGIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nyalldawson/QGIS/merges","archive_url":"https://api.github.com/repos/nyalldawson/QGIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nyalldawson/QGIS/downloads","issues_url":"https://api.github.com/repos/nyalldawson/QGIS/issues{/number}","pulls_url":"https://api.github.com/repos/nyalldawson/QGIS/pulls{/number}","milestones_url":"https://api.github.com/repos/nyalldawson/QGIS/milestones{/number}","notifications_url":"https://api.github.com/repos/nyalldawson/QGIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nyalldawson/QGIS/labels{/name}","releases_url":"https://api.github.com/repos/nyalldawson/QGIS/releases{/id}","created_at":"2013-02-28T23:20:44Z","updated_at":"2015-05-07T12:23:35Z","pushed_at":"2015-12-10T09:49:37Z","git_url":"git://github.com/nyalldawson/QGIS.git","ssh_url":"git@github.com:nyalldawson/QGIS.git","clone_url":"https://github.com/nyalldawson/QGIS.git","svn_url":"https://github.com/nyalldawson/QGIS","homepage":"http://qgis.org","size":1085250,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"qgis:master","ref":"master","sha":"1d55e9dc16664573de222ef0ecd031cbd0057a39","user":{"login":"qgis","id":483444,"avatar_url":"https://avatars.githubusercontent.com/u/483444?v=3","gravatar_id":"","url":"https://api.github.com/users/qgis","html_url":"https://github.com/qgis","followers_url":"https://api.github.com/users/qgis/followers","following_url":"https://api.github.com/users/qgis/following{/other_user}","gists_url":"https://api.github.com/users/qgis/gists{/gist_id}","starred_url":"https://api.github.com/users/qgis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qgis/subscriptions","organizations_url":"https://api.github.com/users/qgis/orgs","repos_url":"https://api.github.com/users/qgis/repos","events_url":"https://api.github.com/users/qgis/events{/privacy}","received_events_url":"https://api.github.com/users/qgis/received_events","type":"Organization","site_admin":false},"repo":{"id":1690480,"name":"QGIS","full_name":"qgis/QGIS","owner":{"login":"qgis","id":483444,"avatar_url":"https://avatars.githubusercontent.com/u/483444?v=3","gravatar_id":"","url":"https://api.github.com/users/qgis","html_url":"https://github.com/qgis","followers_url":"https://api.github.com/users/qgis/followers","following_url":"https://api.github.com/users/qgis/following{/other_user}","gists_url":"https://api.github.com/users/qgis/gists{/gist_id}","starred_url":"https://api.github.com/users/qgis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qgis/subscriptions","organizations_url":"https://api.github.com/users/qgis/orgs","repos_url":"https://api.github.com/users/qgis/repos","events_url":"https://api.github.com/users/qgis/events{/privacy}","received_events_url":"https://api.github.com/users/qgis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qgis/QGIS","description":"QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)","fork":false,"url":"https://api.github.com/repos/qgis/QGIS","forks_url":"https://api.github.com/repos/qgis/QGIS/forks","keys_url":"https://api.github.com/repos/qgis/QGIS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qgis/QGIS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qgis/QGIS/teams","hooks_url":"https://api.github.com/repos/qgis/QGIS/hooks","issue_events_url":"https://api.github.com/repos/qgis/QGIS/issues/events{/number}","events_url":"https://api.github.com/repos/qgis/QGIS/events","assignees_url":"https://api.github.com/repos/qgis/QGIS/assignees{/user}","branches_url":"https://api.github.com/repos/qgis/QGIS/branches{/branch}","tags_url":"https://api.github.com/repos/qgis/QGIS/tags","blobs_url":"https://api.github.com/repos/qgis/QGIS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qgis/QGIS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qgis/QGIS/git/refs{/sha}","trees_url":"https://api.github.com/repos/qgis/QGIS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qgis/QGIS/statuses/{sha}","languages_url":"https://api.github.com/repos/qgis/QGIS/languages","stargazers_url":"https://api.github.com/repos/qgis/QGIS/stargazers","contributors_url":"https://api.github.com/repos/qgis/QGIS/contributors","subscribers_url":"https://api.github.com/repos/qgis/QGIS/subscribers","subscription_url":"https://api.github.com/repos/qgis/QGIS/subscription","commits_url":"https://api.github.com/repos/qgis/QGIS/commits{/sha}","git_commits_url":"https://api.github.com/repos/qgis/QGIS/git/commits{/sha}","comments_url":"https://api.github.com/repos/qgis/QGIS/comments{/number}","issue_comment_url":"https://api.github.com/repos/qgis/QGIS/issues/comments{/number}","contents_url":"https://api.github.com/repos/qgis/QGIS/contents/{+path}","compare_url":"https://api.github.com/repos/qgis/QGIS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qgis/QGIS/merges","archive_url":"https://api.github.com/repos/qgis/QGIS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qgis/QGIS/downloads","issues_url":"https://api.github.com/repos/qgis/QGIS/issues{/number}","pulls_url":"https://api.github.com/repos/qgis/QGIS/pulls{/number}","milestones_url":"https://api.github.com/repos/qgis/QGIS/milestones{/number}","notifications_url":"https://api.github.com/repos/qgis/QGIS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qgis/QGIS/labels{/name}","releases_url":"https://api.github.com/repos/qgis/QGIS/releases{/id}","created_at":"2011-05-02T08:06:26Z","updated_at":"2015-12-09T11:20:50Z","pushed_at":"2015-12-10T10:28:35Z","git_url":"git://github.com/qgis/QGIS.git","ssh_url":"git@github.com:qgis/QGIS.git","clone_url":"https://github.com/qgis/QGIS.git","svn_url":"https://github.com/qgis/QGIS","homepage":"http://qgis.org","size":1209608,"stargazers_count":819,"watchers_count":819,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":752,"mirror_url":null,"open_issues_count":59,"forks":752,"open_issues":59,"watchers":819,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/2521"},"html":{"href":"https://github.com/qgis/QGIS/pull/2521"},"issue":{"href":"https://api.github.com/repos/qgis/QGIS/issues/2521"},"comments":{"href":"https://api.github.com/repos/qgis/QGIS/issues/2521/comments"},"review_comments":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/2521/comments"},"review_comment":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qgis/QGIS/pulls/2521/commits"},"statuses":{"href":"https://api.github.com/repos/qgis/QGIS/statuses/d8a8e66f67885c2a20d28f46b708fd3165e21553"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":2,"review_comments":3,"commits":1,"additions":75,"deletions":46,"changed_files":10}}