{"action":"closed","number":9916,"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/9916","id":328818063,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI4ODE4MDYz","html_url":"https://github.com/apache/flink/pull/9916","diff_url":"https://github.com/apache/flink/pull/9916.diff","patch_url":"https://github.com/apache/flink/pull/9916.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/9916","number":9916,"state":"closed","locked":false,"title":"[FLINK-14408][Table-Planner]UDF's open method is invoked to initialize when sql is optimized in oldPlanner","user":{"login":"wangxlong","id":10867596,"node_id":"MDQ6VXNlcjEwODY3NTk2","avatar_url":"https://avatars3.githubusercontent.com/u/10867596?v=4","gravatar_id":"","url":"https://api.github.com/users/wangxlong","html_url":"https://github.com/wangxlong","followers_url":"https://api.github.com/users/wangxlong/followers","following_url":"https://api.github.com/users/wangxlong/following{/other_user}","gists_url":"https://api.github.com/users/wangxlong/gists{/gist_id}","starred_url":"https://api.github.com/users/wangxlong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangxlong/subscriptions","organizations_url":"https://api.github.com/users/wangxlong/orgs","repos_url":"https://api.github.com/users/wangxlong/repos","events_url":"https://api.github.com/users/wangxlong/events{/privacy}","received_events_url":"https://api.github.com/users/wangxlong/received_events","type":"User","site_admin":false},"body":"## What is the purpose of the change\r\nIn oldPlanner, UDF's open method can not be invoked when SQL is optimized. So this pr will fix it.\r\n\r\n## Brief change log\r\n(1) Add ConstantFunctionContext and ConstantFunctionCodeGenerator to pass functionConext to udf open method.\r\n(2) invoke richMapFunction open method.\r\n\r\n## Verifying this change\r\nThis change added tests and can be verified as follows:\r\n(1) ExpressionReductionRulesTest.testExpressionReductionWithUDF\r\n(2) ExpressionReductionRulesTest.testExpressionReductionWithRichUDF\r\n\r\n## Does this pull request potentially affect one of the following parts:\r\n  - Dependencies (does it add or upgrade a dependency): (no)\r\n  - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)\r\n  - The serializers: (no)\r\n  - The runtime per-record code paths (performance sensitive): (no )\r\n  - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)\r\n  - The S3 file system connector: (no)\r\n\r\n## Documentation\r\n  - Does this pull request introduce a new feature? (no)\r\n  - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)\r\n","created_at":"2019-10-16T15:19:10Z","updated_at":"2019-10-25T04:11:23Z","closed_at":"2019-10-25T04:11:23Z","merged_at":null,"merge_commit_sha":"ba9eee0bf87e7e9f643546cc2f32705f079cad0b","assignee":{"login":"aljoscha","id":68551,"node_id":"MDQ6VXNlcjY4NTUx","avatar_url":"https://avatars1.githubusercontent.com/u/68551?v=4","gravatar_id":"","url":"https://api.github.com/users/aljoscha","html_url":"https://github.com/aljoscha","followers_url":"https://api.github.com/users/aljoscha/followers","following_url":"https://api.github.com/users/aljoscha/following{/other_user}","gists_url":"https://api.github.com/users/aljoscha/gists{/gist_id}","starred_url":"https://api.github.com/users/aljoscha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aljoscha/subscriptions","organizations_url":"https://api.github.com/users/aljoscha/orgs","repos_url":"https://api.github.com/users/aljoscha/repos","events_url":"https://api.github.com/users/aljoscha/events{/privacy}","received_events_url":"https://api.github.com/users/aljoscha/received_events","type":"User","site_admin":false},"assignees":[{"login":"aljoscha","id":68551,"node_id":"MDQ6VXNlcjY4NTUx","avatar_url":"https://avatars1.githubusercontent.com/u/68551?v=4","gravatar_id":"","url":"https://api.github.com/users/aljoscha","html_url":"https://github.com/aljoscha","followers_url":"https://api.github.com/users/aljoscha/followers","following_url":"https://api.github.com/users/aljoscha/following{/other_user}","gists_url":"https://api.github.com/users/aljoscha/gists{/gist_id}","starred_url":"https://api.github.com/users/aljoscha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aljoscha/subscriptions","organizations_url":"https://api.github.com/users/aljoscha/orgs","repos_url":"https://api.github.com/users/aljoscha/repos","events_url":"https://api.github.com/users/aljoscha/events{/privacy}","received_events_url":"https://api.github.com/users/aljoscha/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1285080206,"node_id":"MDU6TGFiZWwxMjg1MDgwMjA2","url":"https://api.github.com/repos/apache/flink/labels/component=TableSQL/Planner","name":"component=TableSQL/Planner","color":"175fb7","default":false},{"id":1244454690,"node_id":"MDU6TGFiZWwxMjQ0NDU0Njkw","url":"https://api.github.com/repos/apache/flink/labels/review=description?","name":"review=description?","color":"bcf5db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/9916/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/9916/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/9916/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/7b954e17cb5bc283a18fd218c93e417d59c4cf37","head":{"label":"wangxlong:FLINK-14408","ref":"FLINK-14408","sha":"7b954e17cb5bc283a18fd218c93e417d59c4cf37","user":{"login":"wangxlong","id":10867596,"node_id":"MDQ6VXNlcjEwODY3NTk2","avatar_url":"https://avatars3.githubusercontent.com/u/10867596?v=4","gravatar_id":"","url":"https://api.github.com/users/wangxlong","html_url":"https://github.com/wangxlong","followers_url":"https://api.github.com/users/wangxlong/followers","following_url":"https://api.github.com/users/wangxlong/following{/other_user}","gists_url":"https://api.github.com/users/wangxlong/gists{/gist_id}","starred_url":"https://api.github.com/users/wangxlong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangxlong/subscriptions","organizations_url":"https://api.github.com/users/wangxlong/orgs","repos_url":"https://api.github.com/users/wangxlong/repos","events_url":"https://api.github.com/users/wangxlong/events{/privacy}","received_events_url":"https://api.github.com/users/wangxlong/received_events","type":"User","site_admin":false},"repo":{"id":166057989,"node_id":"MDEwOlJlcG9zaXRvcnkxNjYwNTc5ODk=","name":"flink","full_name":"wangxlong/flink","private":false,"owner":{"login":"wangxlong","id":10867596,"node_id":"MDQ6VXNlcjEwODY3NTk2","avatar_url":"https://avatars3.githubusercontent.com/u/10867596?v=4","gravatar_id":"","url":"https://api.github.com/users/wangxlong","html_url":"https://github.com/wangxlong","followers_url":"https://api.github.com/users/wangxlong/followers","following_url":"https://api.github.com/users/wangxlong/following{/other_user}","gists_url":"https://api.github.com/users/wangxlong/gists{/gist_id}","starred_url":"https://api.github.com/users/wangxlong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wangxlong/subscriptions","organizations_url":"https://api.github.com/users/wangxlong/orgs","repos_url":"https://api.github.com/users/wangxlong/repos","events_url":"https://api.github.com/users/wangxlong/events{/privacy}","received_events_url":"https://api.github.com/users/wangxlong/received_events","type":"User","site_admin":false},"html_url":"https://github.com/wangxlong/flink","description":"Apache Flink","fork":true,"url":"https://api.github.com/repos/wangxlong/flink","forks_url":"https://api.github.com/repos/wangxlong/flink/forks","keys_url":"https://api.github.com/repos/wangxlong/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wangxlong/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wangxlong/flink/teams","hooks_url":"https://api.github.com/repos/wangxlong/flink/hooks","issue_events_url":"https://api.github.com/repos/wangxlong/flink/issues/events{/number}","events_url":"https://api.github.com/repos/wangxlong/flink/events","assignees_url":"https://api.github.com/repos/wangxlong/flink/assignees{/user}","branches_url":"https://api.github.com/repos/wangxlong/flink/branches{/branch}","tags_url":"https://api.github.com/repos/wangxlong/flink/tags","blobs_url":"https://api.github.com/repos/wangxlong/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wangxlong/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wangxlong/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/wangxlong/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wangxlong/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/wangxlong/flink/languages","stargazers_url":"https://api.github.com/repos/wangxlong/flink/stargazers","contributors_url":"https://api.github.com/repos/wangxlong/flink/contributors","subscribers_url":"https://api.github.com/repos/wangxlong/flink/subscribers","subscription_url":"https://api.github.com/repos/wangxlong/flink/subscription","commits_url":"https://api.github.com/repos/wangxlong/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/wangxlong/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/wangxlong/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/wangxlong/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/wangxlong/flink/contents/{+path}","compare_url":"https://api.github.com/repos/wangxlong/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wangxlong/flink/merges","archive_url":"https://api.github.com/repos/wangxlong/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wangxlong/flink/downloads","issues_url":"https://api.github.com/repos/wangxlong/flink/issues{/number}","pulls_url":"https://api.github.com/repos/wangxlong/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/wangxlong/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/wangxlong/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wangxlong/flink/labels{/name}","releases_url":"https://api.github.com/repos/wangxlong/flink/releases{/id}","deployments_url":"https://api.github.com/repos/wangxlong/flink/deployments","created_at":"2019-01-16T14:55:21Z","updated_at":"2019-10-25T00:21:23Z","pushed_at":"2019-10-25T00:29:36Z","git_url":"git://github.com/wangxlong/flink.git","ssh_url":"git@github.com:wangxlong/flink.git","clone_url":"https://github.com/wangxlong/flink.git","svn_url":"https://github.com/wangxlong/flink","homepage":"","size":207870,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"ad052a870d1a1d457721a67ec4bbea4bc49d33c5","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkyMDU4NzU5OQ==","name":"flink","full_name":"apache/flink","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","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},"html_url":"https://github.com/apache/flink","description":"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":"2019-10-25T03:57:16Z","pushed_at":"2019-10-25T04:11:21Z","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":"","size":263920,"stargazers_count":10754,"watchers_count":10754,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5770,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":480,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":5770,"open_issues":480,"watchers":10754,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/9916"},"html":{"href":"https://github.com/apache/flink/pull/9916"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/9916"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/9916/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/9916/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/9916/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/7b954e17cb5bc283a18fd218c93e417d59c4cf37"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":10,"review_comments":9,"maintainer_can_modify":false,"commits":4,"additions":113,"deletions":7,"changed_files":3}}
{"actor":{"display_login":"wuchong"}}