{"action":"created","comment":{"url":"https://api.github.com/repos/yahoo/fili/pulls/comments/188788874","pull_request_review_id":120839184,"id":188788874,"diff_hunk":"@@ -153,4 +154,58 @@ class TableUtilsSpec extends  Specification {\n         then:\n         constrainedInterval == SimplifiedIntervalList.simplifyIntervals([constrainedInterval1, constrainedInterval2])\n     }\n+\n+    def \"logicalTableAvailability returns union of all the intervals for the availability\"() {\n+        given: \"two intervals [2017, 2018] and [2018, 2019]\"\n+        Interval interval1 = new Interval(\"2017/2018\")\n+        Interval interval2 = new Interval(\"2018/2019\")\n+\n+        AvailabilityTestingUtils.TestAvailability availability1 = new AvailabilityTestingUtils.TestAvailability(\n+                [Mock(DataSourceName)] as Set,\n+                [\"availability\": [interval1] as Set]\n+        )\n+        AvailabilityTestingUtils.TestAvailability availability2 = new AvailabilityTestingUtils.TestAvailability(\n+                [Mock(DataSourceName)] as Set,\n+                [\"availability\": [interval2] as Set]\n+        )\n+\n+        PhysicalTableSchema physicalTableSchema = Mock(PhysicalTableSchema)\n+        physicalTableSchema.getPhysicalColumnName(_ as String) >> \"\"\n+        physicalTableSchema.getColumns() >> Collections.emptySet()\n+\n+        SimplifiedIntervalList simplifiedIntervalList1 = Mock(SimplifiedIntervalList)\n+        SimplifiedIntervalList simplifiedIntervalList2 = Mock(SimplifiedIntervalList)\n+\n+        Column column1 = Mock(Column)\n+        Column column2 = Mock(Column)\n+\n+        Map<Column, SimplifiedIntervalList> intervalList1 = new HashMap<>()\n+        intervalList1.put(column1, simplifiedIntervalList1)\n+\n+        Map<Column, SimplifiedIntervalList> intervalList2 = new HashMap<>()\n+        intervalList2.put(column2, simplifiedIntervalList2)\n+\n+        ConfigPhysicalTable configPhysicalTable1 = Mock(ConfigPhysicalTable)\n+        ConfigPhysicalTable configPhysicalTable2 = Mock(ConfigPhysicalTable)\n+        configPhysicalTable1.getAvailability() >> availability1\n+        configPhysicalTable1.getAvailableIntervals() >> intervalList1","path":"fili-core/src/test/groovy/com/yahoo/bard/webservice/util/TableUtilsSpec.groovy","position":46,"original_position":46,"commit_id":"468268340368ff2c498e072e804c89c82eb0ec02","original_commit_id":"468268340368ff2c498e072e804c89c82eb0ec02","user":{"login":"tarrantzhang","id":14193408,"avatar_url":"https://avatars1.githubusercontent.com/u/14193408?v=4","gravatar_id":"","url":"https://api.github.com/users/tarrantzhang","html_url":"https://github.com/tarrantzhang","followers_url":"https://api.github.com/users/tarrantzhang/followers","following_url":"https://api.github.com/users/tarrantzhang/following{/other_user}","gists_url":"https://api.github.com/users/tarrantzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/tarrantzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarrantzhang/subscriptions","organizations_url":"https://api.github.com/users/tarrantzhang/orgs","repos_url":"https://api.github.com/users/tarrantzhang/repos","events_url":"https://api.github.com/users/tarrantzhang/events{/privacy}","received_events_url":"https://api.github.com/users/tarrantzhang/received_events","type":"User","site_admin":false},"body":"Instead of `getAvailableIntervals()`, should use `getAllAvailableIntervals()` as it was used [here](https://github.com/yahoo/fili/blob/468268340368ff2c498e072e804c89c82eb0ec02/fili-core/src/main/java/com/yahoo/bard/webservice/util/TableUtils.java#L109)","created_at":"2018-05-16T22:17:32Z","updated_at":"2018-05-16T22:17:38Z","html_url":"https://github.com/yahoo/fili/pull/697#discussion_r188788874","pull_request_url":"https://api.github.com/repos/yahoo/fili/pulls/697","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/yahoo/fili/pulls/comments/188788874"},"html":{"href":"https://github.com/yahoo/fili/pull/697#discussion_r188788874"},"pull_request":{"href":"https://api.github.com/repos/yahoo/fili/pulls/697"}}},"pull_request":{"url":"https://api.github.com/repos/yahoo/fili/pulls/697","id":188565463,"html_url":"https://github.com/yahoo/fili/pull/697","diff_url":"https://github.com/yahoo/fili/pull/697.diff","patch_url":"https://github.com/yahoo/fili/pull/697.patch","issue_url":"https://api.github.com/repos/yahoo/fili/issues/697","number":697,"state":"open","locked":false,"title":"Latest time macro","user":{"login":"deepakb91","id":16505137,"avatar_url":"https://avatars2.githubusercontent.com/u/16505137?v=4","gravatar_id":"","url":"https://api.github.com/users/deepakb91","html_url":"https://github.com/deepakb91","followers_url":"https://api.github.com/users/deepakb91/followers","following_url":"https://api.github.com/users/deepakb91/following{/other_user}","gists_url":"https://api.github.com/users/deepakb91/gists{/gist_id}","starred_url":"https://api.github.com/users/deepakb91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepakb91/subscriptions","organizations_url":"https://api.github.com/users/deepakb91/orgs","repos_url":"https://api.github.com/users/deepakb91/repos","events_url":"https://api.github.com/users/deepakb91/events{/privacy}","received_events_url":"https://api.github.com/users/deepakb91/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-16T21:27:32Z","updated_at":"2018-05-16T22:17:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9b430b3f30e50cccdcff121011f86d29f6ea1f9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/yahoo/fili/pulls/697/commits","review_comments_url":"https://api.github.com/repos/yahoo/fili/pulls/697/comments","review_comment_url":"https://api.github.com/repos/yahoo/fili/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yahoo/fili/issues/697/comments","statuses_url":"https://api.github.com/repos/yahoo/fili/statuses/468268340368ff2c498e072e804c89c82eb0ec02","head":{"label":"yahoo:LatestTimeMacro","ref":"LatestTimeMacro","sha":"468268340368ff2c498e072e804c89c82eb0ec02","user":{"login":"yahoo","id":16574,"avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":60879636,"name":"fili","full_name":"yahoo/fili","owner":{"login":"yahoo","id":16574,"avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/fili","description":"Easily make RESTful web services for time series reporting with Big Data analytics engines like Druid and Hive.","fork":false,"url":"https://api.github.com/repos/yahoo/fili","forks_url":"https://api.github.com/repos/yahoo/fili/forks","keys_url":"https://api.github.com/repos/yahoo/fili/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/fili/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/fili/teams","hooks_url":"https://api.github.com/repos/yahoo/fili/hooks","issue_events_url":"https://api.github.com/repos/yahoo/fili/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/fili/events","assignees_url":"https://api.github.com/repos/yahoo/fili/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/fili/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/fili/tags","blobs_url":"https://api.github.com/repos/yahoo/fili/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/fili/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/fili/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/fili/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/fili/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/fili/languages","stargazers_url":"https://api.github.com/repos/yahoo/fili/stargazers","contributors_url":"https://api.github.com/repos/yahoo/fili/contributors","subscribers_url":"https://api.github.com/repos/yahoo/fili/subscribers","subscription_url":"https://api.github.com/repos/yahoo/fili/subscription","commits_url":"https://api.github.com/repos/yahoo/fili/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/fili/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/fili/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/fili/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/fili/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/fili/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/fili/merges","archive_url":"https://api.github.com/repos/yahoo/fili/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/fili/downloads","issues_url":"https://api.github.com/repos/yahoo/fili/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/fili/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/fili/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/fili/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/fili/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/fili/releases{/id}","deployments_url":"https://api.github.com/repos/yahoo/fili/deployments","created_at":"2016-06-10T22:07:59Z","updated_at":"2018-05-14T14:37:40Z","pushed_at":"2018-05-16T21:35:13Z","git_url":"git://github.com/yahoo/fili.git","ssh_url":"git@github.com:yahoo/fili.git","clone_url":"https://github.com/yahoo/fili.git","svn_url":"https://github.com/yahoo/fili","homepage":"http://fili.io","size":9539,"stargazers_count":81,"watchers_count":81,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"archived":false,"open_issues_count":224,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":51,"open_issues":224,"watchers":81,"default_branch":"master"}},"base":{"label":"yahoo:master","ref":"master","sha":"a273a17302f6c7197d03877fbb42363791b83b77","user":{"login":"yahoo","id":16574,"avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"repo":{"id":60879636,"name":"fili","full_name":"yahoo/fili","owner":{"login":"yahoo","id":16574,"avatar_url":"https://avatars1.githubusercontent.com/u/16574?v=4","gravatar_id":"","url":"https://api.github.com/users/yahoo","html_url":"https://github.com/yahoo","followers_url":"https://api.github.com/users/yahoo/followers","following_url":"https://api.github.com/users/yahoo/following{/other_user}","gists_url":"https://api.github.com/users/yahoo/gists{/gist_id}","starred_url":"https://api.github.com/users/yahoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahoo/subscriptions","organizations_url":"https://api.github.com/users/yahoo/orgs","repos_url":"https://api.github.com/users/yahoo/repos","events_url":"https://api.github.com/users/yahoo/events{/privacy}","received_events_url":"https://api.github.com/users/yahoo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yahoo/fili","description":"Easily make RESTful web services for time series reporting with Big Data analytics engines like Druid and Hive.","fork":false,"url":"https://api.github.com/repos/yahoo/fili","forks_url":"https://api.github.com/repos/yahoo/fili/forks","keys_url":"https://api.github.com/repos/yahoo/fili/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yahoo/fili/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yahoo/fili/teams","hooks_url":"https://api.github.com/repos/yahoo/fili/hooks","issue_events_url":"https://api.github.com/repos/yahoo/fili/issues/events{/number}","events_url":"https://api.github.com/repos/yahoo/fili/events","assignees_url":"https://api.github.com/repos/yahoo/fili/assignees{/user}","branches_url":"https://api.github.com/repos/yahoo/fili/branches{/branch}","tags_url":"https://api.github.com/repos/yahoo/fili/tags","blobs_url":"https://api.github.com/repos/yahoo/fili/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yahoo/fili/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yahoo/fili/git/refs{/sha}","trees_url":"https://api.github.com/repos/yahoo/fili/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yahoo/fili/statuses/{sha}","languages_url":"https://api.github.com/repos/yahoo/fili/languages","stargazers_url":"https://api.github.com/repos/yahoo/fili/stargazers","contributors_url":"https://api.github.com/repos/yahoo/fili/contributors","subscribers_url":"https://api.github.com/repos/yahoo/fili/subscribers","subscription_url":"https://api.github.com/repos/yahoo/fili/subscription","commits_url":"https://api.github.com/repos/yahoo/fili/commits{/sha}","git_commits_url":"https://api.github.com/repos/yahoo/fili/git/commits{/sha}","comments_url":"https://api.github.com/repos/yahoo/fili/comments{/number}","issue_comment_url":"https://api.github.com/repos/yahoo/fili/issues/comments{/number}","contents_url":"https://api.github.com/repos/yahoo/fili/contents/{+path}","compare_url":"https://api.github.com/repos/yahoo/fili/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yahoo/fili/merges","archive_url":"https://api.github.com/repos/yahoo/fili/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yahoo/fili/downloads","issues_url":"https://api.github.com/repos/yahoo/fili/issues{/number}","pulls_url":"https://api.github.com/repos/yahoo/fili/pulls{/number}","milestones_url":"https://api.github.com/repos/yahoo/fili/milestones{/number}","notifications_url":"https://api.github.com/repos/yahoo/fili/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yahoo/fili/labels{/name}","releases_url":"https://api.github.com/repos/yahoo/fili/releases{/id}","deployments_url":"https://api.github.com/repos/yahoo/fili/deployments","created_at":"2016-06-10T22:07:59Z","updated_at":"2018-05-14T14:37:40Z","pushed_at":"2018-05-16T21:35:13Z","git_url":"git://github.com/yahoo/fili.git","ssh_url":"git@github.com:yahoo/fili.git","clone_url":"https://github.com/yahoo/fili.git","svn_url":"https://github.com/yahoo/fili","homepage":"http://fili.io","size":9539,"stargazers_count":81,"watchers_count":81,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":51,"mirror_url":null,"archived":false,"open_issues_count":224,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":51,"open_issues":224,"watchers":81,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yahoo/fili/pulls/697"},"html":{"href":"https://github.com/yahoo/fili/pull/697"},"issue":{"href":"https://api.github.com/repos/yahoo/fili/issues/697"},"comments":{"href":"https://api.github.com/repos/yahoo/fili/issues/697/comments"},"review_comments":{"href":"https://api.github.com/repos/yahoo/fili/pulls/697/comments"},"review_comment":{"href":"https://api.github.com/repos/yahoo/fili/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yahoo/fili/pulls/697/commits"},"statuses":{"href":"https://api.github.com/repos/yahoo/fili/statuses/468268340368ff2c498e072e804c89c82eb0ec02"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"tarrantzhang"}}