{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/230040369","pull_request_review_id":170681146,"id":230040369,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDA0MDM2OQ==","diff_hunk":"@@ -136,4 +124,66 @@ class JoinValidationTest extends TableTestBase {\n \n     streamUtil.verifySql(sql, \"n/a\")\n   }\n+\n+  /** Rowtime attributes cannot be accessed in filter conditions yet. */\n+  @Test(expected = classOf[TableException])","path":"flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/stream/sql/validation/JoinValidationTest.scala","position":35,"original_position":35,"commit_id":"7cdc5919a6ac313487f4b73f0e13f5aaa34469f0","original_commit_id":"7cdc5919a6ac313487f4b73f0e13f5aaa34469f0","user":{"login":"pnowojski","id":8957547,"node_id":"MDQ6VXNlcjg5NTc1NDc=","avatar_url":"https://avatars3.githubusercontent.com/u/8957547?v=4","gravatar_id":"","url":"https://api.github.com/users/pnowojski","html_url":"https://github.com/pnowojski","followers_url":"https://api.github.com/users/pnowojski/followers","following_url":"https://api.github.com/users/pnowojski/following{/other_user}","gists_url":"https://api.github.com/users/pnowojski/gists{/gist_id}","starred_url":"https://api.github.com/users/pnowojski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnowojski/subscriptions","organizations_url":"https://api.github.com/users/pnowojski/orgs","repos_url":"https://api.github.com/users/pnowojski/repos","events_url":"https://api.github.com/users/pnowojski/events{/privacy}","received_events_url":"https://api.github.com/users/pnowojski/received_events","type":"User","site_admin":false},"body":"please add also some trivial expected message matcher, otherwise this can give false negative results.","created_at":"2018-11-01T13:24:22Z","updated_at":"2018-11-01T13:50:11Z","html_url":"https://github.com/apache/flink/pull/6987#discussion_r230040369","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/6987","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/230040369"},"html":{"href":"https://github.com/apache/flink/pull/6987#discussion_r230040369"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/6987"}}},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/6987","id":227610879,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3NjEwODc5","html_url":"https://github.com/apache/flink/pull/6987","diff_url":"https://github.com/apache/flink/pull/6987.diff","patch_url":"https://github.com/apache/flink/pull/6987.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/6987","number":6987,"state":"open","locked":false,"title":"[FLINK-8897] [table] Fix rowtime materialization issues for filters and joins","user":{"login":"twalthr","id":5746567,"node_id":"MDQ6VXNlcjU3NDY1Njc=","avatar_url":"https://avatars1.githubusercontent.com/u/5746567?v=4","gravatar_id":"","url":"https://api.github.com/users/twalthr","html_url":"https://github.com/twalthr","followers_url":"https://api.github.com/users/twalthr/followers","following_url":"https://api.github.com/users/twalthr/following{/other_user}","gists_url":"https://api.github.com/users/twalthr/gists{/gist_id}","starred_url":"https://api.github.com/users/twalthr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twalthr/subscriptions","organizations_url":"https://api.github.com/users/twalthr/orgs","repos_url":"https://api.github.com/users/twalthr/repos","events_url":"https://api.github.com/users/twalthr/events{/privacy}","received_events_url":"https://api.github.com/users/twalthr/received_events","type":"User","site_admin":false},"body":"## What is the purpose of the change\r\n\r\nThis PR solves the `\"mismatched type\" AssertionError` caused by invalid time indicator materialization. FLINK-6232 removed the materialization of filters for windowed joins, however, this led to mismatches between input types and expected input types of `RexNodes`. This PR modifies the window join rule to match against a newly materialized expression (`CAST(rowtime)` and `PROCTIME(proctime)`) instead.\r\n\r\nAdditionally, this PR simplifies the general time attribute logic for joins and gives better error messages for current limitations (namely no rowtime attributes in projections or condiitions). We should fix these limitation by some major refactoring as part of FLINK-10211.\r\n\r\n\r\n## Brief change log\r\n\r\n- Materialize conditions of filters and joins again and match against newly materialized expressions\r\n- Simplify code and improve error message\r\n\r\n\r\n## Verifying this change\r\n\r\n- Change is covered by existing tests.\r\n- New tests in `JoinValidationTest`\r\n- New test in `TimeAttributesITCase`\r\n\r\n## Does this pull request potentially affect one of the following parts:\r\n\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\r\n  - Does this pull request introduce a new feature? no\r\n  - If yes, how is the feature documented? not applicable\r\n","created_at":"2018-11-01T12:59:06Z","updated_at":"2018-11-01T13:50:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4a7db86a258ad40f8058455919f4be8a0dedfc2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/6987/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/6987/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/6987/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/7cdc5919a6ac313487f4b73f0e13f5aaa34469f0","head":{"label":"twalthr:FLINK-8897","ref":"FLINK-8897","sha":"7cdc5919a6ac313487f4b73f0e13f5aaa34469f0","user":{"login":"twalthr","id":5746567,"node_id":"MDQ6VXNlcjU3NDY1Njc=","avatar_url":"https://avatars1.githubusercontent.com/u/5746567?v=4","gravatar_id":"","url":"https://api.github.com/users/twalthr","html_url":"https://github.com/twalthr","followers_url":"https://api.github.com/users/twalthr/followers","following_url":"https://api.github.com/users/twalthr/following{/other_user}","gists_url":"https://api.github.com/users/twalthr/gists{/gist_id}","starred_url":"https://api.github.com/users/twalthr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twalthr/subscriptions","organizations_url":"https://api.github.com/users/twalthr/orgs","repos_url":"https://api.github.com/users/twalthr/repos","events_url":"https://api.github.com/users/twalthr/events{/privacy}","received_events_url":"https://api.github.com/users/twalthr/received_events","type":"User","site_admin":false},"repo":{"id":20658760,"node_id":"MDEwOlJlcG9zaXRvcnkyMDY1ODc2MA==","name":"flink","full_name":"twalthr/flink","private":false,"owner":{"login":"twalthr","id":5746567,"node_id":"MDQ6VXNlcjU3NDY1Njc=","avatar_url":"https://avatars1.githubusercontent.com/u/5746567?v=4","gravatar_id":"","url":"https://api.github.com/users/twalthr","html_url":"https://github.com/twalthr","followers_url":"https://api.github.com/users/twalthr/followers","following_url":"https://api.github.com/users/twalthr/following{/other_user}","gists_url":"https://api.github.com/users/twalthr/gists{/gist_id}","starred_url":"https://api.github.com/users/twalthr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twalthr/subscriptions","organizations_url":"https://api.github.com/users/twalthr/orgs","repos_url":"https://api.github.com/users/twalthr/repos","events_url":"https://api.github.com/users/twalthr/events{/privacy}","received_events_url":"https://api.github.com/users/twalthr/received_events","type":"User","site_admin":false},"html_url":"https://github.com/twalthr/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/twalthr/flink","forks_url":"https://api.github.com/repos/twalthr/flink/forks","keys_url":"https://api.github.com/repos/twalthr/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twalthr/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twalthr/flink/teams","hooks_url":"https://api.github.com/repos/twalthr/flink/hooks","issue_events_url":"https://api.github.com/repos/twalthr/flink/issues/events{/number}","events_url":"https://api.github.com/repos/twalthr/flink/events","assignees_url":"https://api.github.com/repos/twalthr/flink/assignees{/user}","branches_url":"https://api.github.com/repos/twalthr/flink/branches{/branch}","tags_url":"https://api.github.com/repos/twalthr/flink/tags","blobs_url":"https://api.github.com/repos/twalthr/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twalthr/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twalthr/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/twalthr/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twalthr/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/twalthr/flink/languages","stargazers_url":"https://api.github.com/repos/twalthr/flink/stargazers","contributors_url":"https://api.github.com/repos/twalthr/flink/contributors","subscribers_url":"https://api.github.com/repos/twalthr/flink/subscribers","subscription_url":"https://api.github.com/repos/twalthr/flink/subscription","commits_url":"https://api.github.com/repos/twalthr/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/twalthr/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/twalthr/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/twalthr/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/twalthr/flink/contents/{+path}","compare_url":"https://api.github.com/repos/twalthr/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twalthr/flink/merges","archive_url":"https://api.github.com/repos/twalthr/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twalthr/flink/downloads","issues_url":"https://api.github.com/repos/twalthr/flink/issues{/number}","pulls_url":"https://api.github.com/repos/twalthr/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/twalthr/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/twalthr/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twalthr/flink/labels{/name}","releases_url":"https://api.github.com/repos/twalthr/flink/releases{/id}","deployments_url":"https://api.github.com/repos/twalthr/flink/deployments","created_at":"2014-06-09T19:08:51Z","updated_at":"2018-01-21T08:21:23Z","pushed_at":"2018-11-01T12:49:21Z","git_url":"git://github.com/twalthr/flink.git","ssh_url":"git@github.com:twalthr/flink.git","clone_url":"https://github.com/twalthr/flink.git","svn_url":"https://github.com/twalthr/flink","homepage":null,"size":170718,"stargazers_count":2,"watchers_count":2,"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,"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":2,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"28c02f6af06242bc8e335580e0e1fb151e3be1e7","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":"2018-11-01T12:46:10Z","pushed_at":"2018-11-01T13:01:36Z","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":168955,"stargazers_count":4776,"watchers_count":4776,"language":"Java","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3059,"mirror_url":null,"archived":false,"open_issues_count":389,"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":3059,"open_issues":389,"watchers":4776,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/6987"},"html":{"href":"https://github.com/apache/flink/pull/6987"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/6987"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/6987/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/6987/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/6987/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/7cdc5919a6ac313487f4b73f0e13f5aaa34469f0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pnowojski"}}