{"action":"created","issue":{"url":"https://api.github.com/repos/apache/flink/issues/3502","repository_url":"https://api.github.com/repos/apache/flink","labels_url":"https://api.github.com/repos/apache/flink/issues/3502/labels{/name}","comments_url":"https://api.github.com/repos/apache/flink/issues/3502/comments","events_url":"https://api.github.com/repos/apache/flink/issues/3502/events","html_url":"https://github.com/apache/flink/pull/3502","id":213148182,"number":3502,"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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-03-09T20:00:52Z","updated_at":"2017-03-21T10:15:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/3502","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"},"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"},"comment":{"url":"https://api.github.com/repos/apache/flink/issues/comments/288033567","html_url":"https://github.com/apache/flink/pull/3502#issuecomment-288033567","issue_url":"https://api.github.com/repos/apache/flink/issues/3502","id":288033567,"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},"created_at":"2017-03-21T10:15:50Z","updated_at":"2017-03-21T10:15:50Z","body":"@rtudoran This PR related to batch API rather than stream API"}}
{"actor":{"display_login":"DmytroShkvyra"}}