{"action":"created","issue":{"url":"https://api.github.com/repos/apache/metamodel/issues/115","repository_url":"https://api.github.com/repos/apache/metamodel","labels_url":"https://api.github.com/repos/apache/metamodel/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/apache/metamodel/issues/115/comments","events_url":"https://api.github.com/repos/apache/metamodel/issues/115/events","html_url":"https://github.com/apache/metamodel/pull/115","id":165097340,"number":115,"title":"Anchor WildcardPattern to start","user":{"login":"LosD","id":1282832,"avatar_url":"https://avatars.githubusercontent.com/u/1282832?v=3","gravatar_id":"","url":"https://api.github.com/users/LosD","html_url":"https://github.com/LosD","followers_url":"https://api.github.com/users/LosD/followers","following_url":"https://api.github.com/users/LosD/following{/other_user}","gists_url":"https://api.github.com/users/LosD/gists{/gist_id}","starred_url":"https://api.github.com/users/LosD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LosD/subscriptions","organizations_url":"https://api.github.com/users/LosD/orgs","repos_url":"https://api.github.com/users/LosD/repos","events_url":"https://api.github.com/users/LosD/events{/privacy}","received_events_url":"https://api.github.com/users/LosD/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-12T14:40:06Z","updated_at":"2016-07-13T07:37:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/metamodel/pulls/115","html_url":"https://github.com/apache/metamodel/pull/115","diff_url":"https://github.com/apache/metamodel/pull/115.diff","patch_url":"https://github.com/apache/metamodel/pull/115.patch"},"body":"This makes sure the `WildcardPattern` anchors its test to the start of the string, not only the end.\r\n\r\nThis comes with a minor performance penalty (quick test said 5-10%), but I think correctness trumps speed here.\r\n\r\nI would have liked to compare speed with pre-compiled regexes (`Pattern.quote()` the operand, replace `%` with `.*?` and anchor it with `^` and `$`), but if the LIKE operand is inside a `SelectItem`, that would mean compiling a new regex pattern for every row, which would probably be _very_ expensive, so I opted not to try. There seem to be some similar optimization of the IN operator, so I might be wrong, though.\r\n\r\nFixes METAMODEL-1103"},"comment":{"url":"https://api.github.com/repos/apache/metamodel/issues/comments/232279357","html_url":"https://github.com/apache/metamodel/pull/115#issuecomment-232279357","issue_url":"https://api.github.com/repos/apache/metamodel/issues/115","id":232279357,"user":{"login":"LosD","id":1282832,"avatar_url":"https://avatars.githubusercontent.com/u/1282832?v=3","gravatar_id":"","url":"https://api.github.com/users/LosD","html_url":"https://github.com/LosD","followers_url":"https://api.github.com/users/LosD/followers","following_url":"https://api.github.com/users/LosD/following{/other_user}","gists_url":"https://api.github.com/users/LosD/gists{/gist_id}","starred_url":"https://api.github.com/users/LosD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LosD/subscriptions","organizations_url":"https://api.github.com/users/LosD/orgs","repos_url":"https://api.github.com/users/LosD/repos","events_url":"https://api.github.com/users/LosD/events{/privacy}","received_events_url":"https://api.github.com/users/LosD/received_events","type":"User","site_admin":false},"created_at":"2016-07-13T07:37:48Z","updated_at":"2016-07-13T07:37:48Z","body":"Empty strings now supported.\r\n\r\nWe're still pretty far from full LIKE support as we're missing single character (_), character lists ([abc] much like regex), negation ([!abc]) and ESCAPE. However those are simply missing features and not a  bug like this. I'll create a lower-priority issue with that."}}
{"actor":{"display_login":"LosD"}}