{"action":"closed","number":3502,"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/3502","id":109993771,"html_url":"https://github.com/apache/flink/pull/3502","diff_url":"https://github.com/apache/flink/pull/3502.diff","patch_url":"https://github.com/apache/flink/pull/3502.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/3502","number":3502,"state":"closed","locked":false,"title":"[FLINK-4565] Support for SQL IN operator","user":{"login":"DmytroShkvyra","id":3136590,"avatar_url":"https://avatars2.githubusercontent.com/u/3136590?v=3","gravatar_id":"","url":"https://api.github.com/users/DmytroShkvyra","html_url":"https://github.com/DmytroShkvyra","followers_url":"https://api.github.com/users/DmytroShkvyra/followers","following_url":"https://api.github.com/users/DmytroShkvyra/following{/other_user}","gists_url":"https://api.github.com/users/DmytroShkvyra/gists{/gist_id}","starred_url":"https://api.github.com/users/DmytroShkvyra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DmytroShkvyra/subscriptions","organizations_url":"https://api.github.com/users/DmytroShkvyra/orgs","repos_url":"https://api.github.com/users/DmytroShkvyra/repos","events_url":"https://api.github.com/users/DmytroShkvyra/events{/privacy}","received_events_url":"https://api.github.com/users/DmytroShkvyra/received_events","type":"User","site_admin":false},"body":"[FLINK-4565] Support for SQL IN operator\r\nThis PR is a part of work on SQL IN operator in Table API, which implements IN for literals.\r\nTwo cases are covered: less and great then 20 literals.\r\n\r\nAlso I have some questions:\r\n- converting all numeric types to BigDecimal isn't ok? I decided to make so to simplify use of hashset.\r\n- validation isn't really good. It forces to use operator with same type literals. Should I rework it or maybe just add more cases?\r\nexpressionDsl.scala:\r\nentry point for IN operator in scala API\r\nScalarOperators.scala:\r\n1) All numeric types are upcasting to BigDecimal for using in hashset, other types are unchanged in castNumeric\r\n2) valuesInitialization used for 2 cases: when we have more then 20 operands (then we use hashset, initialized in constructor, descibed below) and less then 20 operands (then we initialize operands in method's body and use them in conjunction)\r\n3) comparison also covers described above cases. In first case we use callback to declare and initialize hashset with all operands. Otherwise we just put all operands in conjunction.\r\n4) Final code is built up with these code snippets.\r\nCodeGenerator.scala:\r\npasses arguments and callback to declare and init hashet\r\nFunctionCatalog.scala:\r\nregisters \"in\" as method\r\nInITCase:\r\nsome use cases","created_at":"2017-03-09T20:00:52Z","updated_at":"2017-03-10T13:43:16Z","closed_at":"2017-03-10T13:43:16Z","merged_at":null,"merge_commit_sha":"edf1dd4f6325724b9dd638c942c3b0e7f487e829","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/3502/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/3502/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/3502/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/230b02c9e5967da16f4a5694bf36d247c59ed4b4","head":{"label":"DmytroShkvyra:FLINK-4565-NV","ref":"FLINK-4565-NV","sha":"230b02c9e5967da16f4a5694bf36d247c59ed4b4","user":{"login":"DmytroShkvyra","id":3136590,"avatar_url":"https://avatars2.githubusercontent.com/u/3136590?v=3","gravatar_id":"","url":"https://api.github.com/users/DmytroShkvyra","html_url":"https://github.com/DmytroShkvyra","followers_url":"https://api.github.com/users/DmytroShkvyra/followers","following_url":"https://api.github.com/users/DmytroShkvyra/following{/other_user}","gists_url":"https://api.github.com/users/DmytroShkvyra/gists{/gist_id}","starred_url":"https://api.github.com/users/DmytroShkvyra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DmytroShkvyra/subscriptions","organizations_url":"https://api.github.com/users/DmytroShkvyra/orgs","repos_url":"https://api.github.com/users/DmytroShkvyra/repos","events_url":"https://api.github.com/users/DmytroShkvyra/events{/privacy}","received_events_url":"https://api.github.com/users/DmytroShkvyra/received_events","type":"User","site_admin":false},"repo":{"id":82823114,"name":"flink","full_name":"DmytroShkvyra/flink","owner":{"login":"DmytroShkvyra","id":3136590,"avatar_url":"https://avatars2.githubusercontent.com/u/3136590?v=3","gravatar_id":"","url":"https://api.github.com/users/DmytroShkvyra","html_url":"https://github.com/DmytroShkvyra","followers_url":"https://api.github.com/users/DmytroShkvyra/followers","following_url":"https://api.github.com/users/DmytroShkvyra/following{/other_user}","gists_url":"https://api.github.com/users/DmytroShkvyra/gists{/gist_id}","starred_url":"https://api.github.com/users/DmytroShkvyra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DmytroShkvyra/subscriptions","organizations_url":"https://api.github.com/users/DmytroShkvyra/orgs","repos_url":"https://api.github.com/users/DmytroShkvyra/repos","events_url":"https://api.github.com/users/DmytroShkvyra/events{/privacy}","received_events_url":"https://api.github.com/users/DmytroShkvyra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DmytroShkvyra/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/DmytroShkvyra/flink","forks_url":"https://api.github.com/repos/DmytroShkvyra/flink/forks","keys_url":"https://api.github.com/repos/DmytroShkvyra/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DmytroShkvyra/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DmytroShkvyra/flink/teams","hooks_url":"https://api.github.com/repos/DmytroShkvyra/flink/hooks","issue_events_url":"https://api.github.com/repos/DmytroShkvyra/flink/issues/events{/number}","events_url":"https://api.github.com/repos/DmytroShkvyra/flink/events","assignees_url":"https://api.github.com/repos/DmytroShkvyra/flink/assignees{/user}","branches_url":"https://api.github.com/repos/DmytroShkvyra/flink/branches{/branch}","tags_url":"https://api.github.com/repos/DmytroShkvyra/flink/tags","blobs_url":"https://api.github.com/repos/DmytroShkvyra/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DmytroShkvyra/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DmytroShkvyra/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/DmytroShkvyra/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DmytroShkvyra/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/DmytroShkvyra/flink/languages","stargazers_url":"https://api.github.com/repos/DmytroShkvyra/flink/stargazers","contributors_url":"https://api.github.com/repos/DmytroShkvyra/flink/contributors","subscribers_url":"https://api.github.com/repos/DmytroShkvyra/flink/subscribers","subscription_url":"https://api.github.com/repos/DmytroShkvyra/flink/subscription","commits_url":"https://api.github.com/repos/DmytroShkvyra/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/DmytroShkvyra/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/DmytroShkvyra/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/DmytroShkvyra/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/DmytroShkvyra/flink/contents/{+path}","compare_url":"https://api.github.com/repos/DmytroShkvyra/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DmytroShkvyra/flink/merges","archive_url":"https://api.github.com/repos/DmytroShkvyra/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DmytroShkvyra/flink/downloads","issues_url":"https://api.github.com/repos/DmytroShkvyra/flink/issues{/number}","pulls_url":"https://api.github.com/repos/DmytroShkvyra/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/DmytroShkvyra/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/DmytroShkvyra/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DmytroShkvyra/flink/labels{/name}","releases_url":"https://api.github.com/repos/DmytroShkvyra/flink/releases{/id}","deployments_url":"https://api.github.com/repos/DmytroShkvyra/flink/deployments","created_at":"2017-02-22T15:53:22Z","updated_at":"2017-02-22T15:53:47Z","pushed_at":"2017-03-10T11:23:45Z","git_url":"git://github.com/DmytroShkvyra/flink.git","ssh_url":"git@github.com:DmytroShkvyra/flink.git","clone_url":"https://github.com/DmytroShkvyra/flink.git","svn_url":"https://github.com/DmytroShkvyra/flink","homepage":null,"size":118734,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"apache:master","ref":"master","sha":"7456d78d271b217c80d46e24029c55741807e51d","user":{"login":"apache","id":47359,"avatar_url":"https://avatars3.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":20587599,"name":"flink","full_name":"apache/flink","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars3.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/flink","description":"Mirror of Apache Flink","fork":false,"url":"https://api.github.com/repos/apache/flink","forks_url":"https://api.github.com/repos/apache/flink/forks","keys_url":"https://api.github.com/repos/apache/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/flink/teams","hooks_url":"https://api.github.com/repos/apache/flink/hooks","issue_events_url":"https://api.github.com/repos/apache/flink/issues/events{/number}","events_url":"https://api.github.com/repos/apache/flink/events","assignees_url":"https://api.github.com/repos/apache/flink/assignees{/user}","branches_url":"https://api.github.com/repos/apache/flink/branches{/branch}","tags_url":"https://api.github.com/repos/apache/flink/tags","blobs_url":"https://api.github.com/repos/apache/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/flink/languages","stargazers_url":"https://api.github.com/repos/apache/flink/stargazers","contributors_url":"https://api.github.com/repos/apache/flink/contributors","subscribers_url":"https://api.github.com/repos/apache/flink/subscribers","subscription_url":"https://api.github.com/repos/apache/flink/subscription","commits_url":"https://api.github.com/repos/apache/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/flink/contents/{+path}","compare_url":"https://api.github.com/repos/apache/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/flink/merges","archive_url":"https://api.github.com/repos/apache/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/flink/downloads","issues_url":"https://api.github.com/repos/apache/flink/issues{/number}","pulls_url":"https://api.github.com/repos/apache/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/flink/labels{/name}","releases_url":"https://api.github.com/repos/apache/flink/releases{/id}","deployments_url":"https://api.github.com/repos/apache/flink/deployments","created_at":"2014-06-07T07:00:10Z","updated_at":"2017-03-10T12:29:49Z","pushed_at":"2017-03-10T13:43:01Z","git_url":"git://github.com/apache/flink.git","ssh_url":"git@github.com:apache/flink.git","clone_url":"https://github.com/apache/flink.git","svn_url":"https://github.com/apache/flink","homepage":null,"size":118792,"stargazers_count":2094,"watchers_count":2094,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1447,"mirror_url":"git://git.apache.org/flink.git","open_issues_count":223,"forks":1447,"open_issues":223,"watchers":2094,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/3502"},"html":{"href":"https://github.com/apache/flink/pull/3502"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/3502"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/3502/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/3502/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/3502/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/230b02c9e5967da16f4a5694bf36d247c59ed4b4"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":4,"additions":557,"deletions":8,"changed_files":11}}
{"actor":{"display_login":"DmytroShkvyra"}}