{"action":"created","comment":{"url":"https://api.github.com/repos/cube-js/cube.js/pulls/comments/349884221","pull_request_review_id":321923392,"id":349884221,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM0OTg4NDIyMQ==","diff_hunk":"@@ -952,17 +960,27 @@ class BaseQuery {\n           this.safeEvaluateSymbolContext().leafMeasures[this.safeEvaluateSymbolContext().currentMeasure] = true;\n         }\n       }\n+      let evaluatedSql;\n+      if (this.safeEvaluateSymbolContext().rollupQuery && symbol.type === 'sum' && symbol.filters) {","path":"packages/cubejs-schema-compiler/adapter/BaseQuery.js","position":20,"original_position":20,"commit_id":"4705af080cd9549ff735f3ab6ea99dfd8de8b4ac","original_commit_id":"4705af080cd9549ff735f3ab6ea99dfd8de8b4ac","user":{"login":"paveltiunov","id":323320,"node_id":"MDQ6VXNlcjMyMzMyMA==","avatar_url":"https://avatars3.githubusercontent.com/u/323320?v=4","gravatar_id":"","url":"https://api.github.com/users/paveltiunov","html_url":"https://github.com/paveltiunov","followers_url":"https://api.github.com/users/paveltiunov/followers","following_url":"https://api.github.com/users/paveltiunov/following{/other_user}","gists_url":"https://api.github.com/users/paveltiunov/gists{/gist_id}","starred_url":"https://api.github.com/users/paveltiunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paveltiunov/subscriptions","organizations_url":"https://api.github.com/users/paveltiunov/orgs","repos_url":"https://api.github.com/users/paveltiunov/repos","events_url":"https://api.github.com/users/paveltiunov/events{/privacy}","received_events_url":"https://api.github.com/users/paveltiunov/received_events","type":"User","site_admin":false},"body":"@ferrants Great! I think we're almost there! I believe we don't need these changes if we add timeDimensions to `renderedReference` as well. We should also get rid of these lines then:\r\nhttps://github.com/cube-js/cube.js/blob/4705af080cd9549ff735f3ab6ea99dfd8de8b4ac/packages/cubejs-schema-compiler/adapter/BaseQuery.js#L894-L897","created_at":"2019-11-23T18:38:47Z","updated_at":"2019-11-23T18:38:48Z","html_url":"https://github.com/cube-js/cube.js/pull/273#discussion_r349884221","pull_request_url":"https://api.github.com/repos/cube-js/cube.js/pulls/273","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cube-js/cube.js/pulls/comments/349884221"},"html":{"href":"https://github.com/cube-js/cube.js/pull/273#discussion_r349884221"},"pull_request":{"href":"https://api.github.com/repos/cube-js/cube.js/pulls/273"}}},"pull_request":{"url":"https://api.github.com/repos/cube-js/cube.js/pulls/273","id":343787354,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQzNzg3MzU0","html_url":"https://github.com/cube-js/cube.js/pull/273","diff_url":"https://github.com/cube-js/cube.js/pull/273.diff","patch_url":"https://github.com/cube-js/cube.js/pull/273.patch","issue_url":"https://api.github.com/repos/cube-js/cube.js/issues/273","number":273,"state":"open","locked":false,"title":"fix for error when querying preaggregates with filters","user":{"login":"ferrants","id":882183,"node_id":"MDQ6VXNlcjg4MjE4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/882183?v=4","gravatar_id":"","url":"https://api.github.com/users/ferrants","html_url":"https://github.com/ferrants","followers_url":"https://api.github.com/users/ferrants/followers","following_url":"https://api.github.com/users/ferrants/following{/other_user}","gists_url":"https://api.github.com/users/ferrants/gists{/gist_id}","starred_url":"https://api.github.com/users/ferrants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferrants/subscriptions","organizations_url":"https://api.github.com/users/ferrants/orgs","repos_url":"https://api.github.com/users/ferrants/repos","events_url":"https://api.github.com/users/ferrants/events{/privacy}","received_events_url":"https://api.github.com/users/ferrants/received_events","type":"User","site_admin":false},"body":"**Check List**\r\n- [x] Tests has been run in packages where changes made if available\r\n- [ ] Linter has been run for changed code\r\n- [x] Tests for the changes have been added if not covered yet\r\n- [x] Docs have been added / updated if required\r\n\r\n**Issue Reference this PR resolves**\r\n\r\n#262 \r\n\r\n**Description of Changes Made (if issue reference is not provided)**\r\n\r\nHandling querying from preaggregates when using a filter and avoiding the nested aggregate functions\r\n","created_at":"2019-11-21T00:29:10Z","updated_at":"2019-11-23T18:38:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cce7fc049a2c2bdd121caec78f8eabd5ac8a81a2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cube-js/cube.js/pulls/273/commits","review_comments_url":"https://api.github.com/repos/cube-js/cube.js/pulls/273/comments","review_comment_url":"https://api.github.com/repos/cube-js/cube.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cube-js/cube.js/issues/273/comments","statuses_url":"https://api.github.com/repos/cube-js/cube.js/statuses/4705af080cd9549ff735f3ab6ea99dfd8de8b4ac","head":{"label":"ferrants:fix-262","ref":"fix-262","sha":"4705af080cd9549ff735f3ab6ea99dfd8de8b4ac","user":{"login":"ferrants","id":882183,"node_id":"MDQ6VXNlcjg4MjE4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/882183?v=4","gravatar_id":"","url":"https://api.github.com/users/ferrants","html_url":"https://github.com/ferrants","followers_url":"https://api.github.com/users/ferrants/followers","following_url":"https://api.github.com/users/ferrants/following{/other_user}","gists_url":"https://api.github.com/users/ferrants/gists{/gist_id}","starred_url":"https://api.github.com/users/ferrants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferrants/subscriptions","organizations_url":"https://api.github.com/users/ferrants/orgs","repos_url":"https://api.github.com/users/ferrants/repos","events_url":"https://api.github.com/users/ferrants/events{/privacy}","received_events_url":"https://api.github.com/users/ferrants/received_events","type":"User","site_admin":false},"repo":{"id":216883540,"node_id":"MDEwOlJlcG9zaXRvcnkyMTY4ODM1NDA=","name":"cube.js","full_name":"ferrants/cube.js","private":false,"owner":{"login":"ferrants","id":882183,"node_id":"MDQ6VXNlcjg4MjE4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/882183?v=4","gravatar_id":"","url":"https://api.github.com/users/ferrants","html_url":"https://github.com/ferrants","followers_url":"https://api.github.com/users/ferrants/followers","following_url":"https://api.github.com/users/ferrants/following{/other_user}","gists_url":"https://api.github.com/users/ferrants/gists{/gist_id}","starred_url":"https://api.github.com/users/ferrants/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferrants/subscriptions","organizations_url":"https://api.github.com/users/ferrants/orgs","repos_url":"https://api.github.com/users/ferrants/repos","events_url":"https://api.github.com/users/ferrants/events{/privacy}","received_events_url":"https://api.github.com/users/ferrants/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ferrants/cube.js","description":"📊 Cube.js - Open Source Analytics Framework","fork":true,"url":"https://api.github.com/repos/ferrants/cube.js","forks_url":"https://api.github.com/repos/ferrants/cube.js/forks","keys_url":"https://api.github.com/repos/ferrants/cube.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ferrants/cube.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ferrants/cube.js/teams","hooks_url":"https://api.github.com/repos/ferrants/cube.js/hooks","issue_events_url":"https://api.github.com/repos/ferrants/cube.js/issues/events{/number}","events_url":"https://api.github.com/repos/ferrants/cube.js/events","assignees_url":"https://api.github.com/repos/ferrants/cube.js/assignees{/user}","branches_url":"https://api.github.com/repos/ferrants/cube.js/branches{/branch}","tags_url":"https://api.github.com/repos/ferrants/cube.js/tags","blobs_url":"https://api.github.com/repos/ferrants/cube.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ferrants/cube.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ferrants/cube.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/ferrants/cube.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ferrants/cube.js/statuses/{sha}","languages_url":"https://api.github.com/repos/ferrants/cube.js/languages","stargazers_url":"https://api.github.com/repos/ferrants/cube.js/stargazers","contributors_url":"https://api.github.com/repos/ferrants/cube.js/contributors","subscribers_url":"https://api.github.com/repos/ferrants/cube.js/subscribers","subscription_url":"https://api.github.com/repos/ferrants/cube.js/subscription","commits_url":"https://api.github.com/repos/ferrants/cube.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/ferrants/cube.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/ferrants/cube.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/ferrants/cube.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/ferrants/cube.js/contents/{+path}","compare_url":"https://api.github.com/repos/ferrants/cube.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ferrants/cube.js/merges","archive_url":"https://api.github.com/repos/ferrants/cube.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ferrants/cube.js/downloads","issues_url":"https://api.github.com/repos/ferrants/cube.js/issues{/number}","pulls_url":"https://api.github.com/repos/ferrants/cube.js/pulls{/number}","milestones_url":"https://api.github.com/repos/ferrants/cube.js/milestones{/number}","notifications_url":"https://api.github.com/repos/ferrants/cube.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ferrants/cube.js/labels{/name}","releases_url":"https://api.github.com/repos/ferrants/cube.js/releases{/id}","deployments_url":"https://api.github.com/repos/ferrants/cube.js/deployments","created_at":"2019-10-22T18:32:04Z","updated_at":"2019-11-18T21:21:29Z","pushed_at":"2019-11-23T07:41:15Z","git_url":"git://github.com/ferrants/cube.js.git","ssh_url":"git@github.com:ferrants/cube.js.git","clone_url":"https://github.com/ferrants/cube.js.git","svn_url":"https://github.com/ferrants/cube.js","homepage":"https://cube.dev","size":19436,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cube-js:master","ref":"master","sha":"b11a8c3d8218a830506aa185969a968a54087b87","user":{"login":"cube-js","id":52467369,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyNDY3MzY5","avatar_url":"https://avatars1.githubusercontent.com/u/52467369?v=4","gravatar_id":"","url":"https://api.github.com/users/cube-js","html_url":"https://github.com/cube-js","followers_url":"https://api.github.com/users/cube-js/followers","following_url":"https://api.github.com/users/cube-js/following{/other_user}","gists_url":"https://api.github.com/users/cube-js/gists{/gist_id}","starred_url":"https://api.github.com/users/cube-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cube-js/subscriptions","organizations_url":"https://api.github.com/users/cube-js/orgs","repos_url":"https://api.github.com/users/cube-js/repos","events_url":"https://api.github.com/users/cube-js/events{/privacy}","received_events_url":"https://api.github.com/users/cube-js/received_events","type":"Organization","site_admin":false},"repo":{"id":149026292,"node_id":"MDEwOlJlcG9zaXRvcnkxNDkwMjYyOTI=","name":"cube.js","full_name":"cube-js/cube.js","private":false,"owner":{"login":"cube-js","id":52467369,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUyNDY3MzY5","avatar_url":"https://avatars1.githubusercontent.com/u/52467369?v=4","gravatar_id":"","url":"https://api.github.com/users/cube-js","html_url":"https://github.com/cube-js","followers_url":"https://api.github.com/users/cube-js/followers","following_url":"https://api.github.com/users/cube-js/following{/other_user}","gists_url":"https://api.github.com/users/cube-js/gists{/gist_id}","starred_url":"https://api.github.com/users/cube-js/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cube-js/subscriptions","organizations_url":"https://api.github.com/users/cube-js/orgs","repos_url":"https://api.github.com/users/cube-js/repos","events_url":"https://api.github.com/users/cube-js/events{/privacy}","received_events_url":"https://api.github.com/users/cube-js/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cube-js/cube.js","description":"📊 Cube.js - Open Source Analytics Framework","fork":false,"url":"https://api.github.com/repos/cube-js/cube.js","forks_url":"https://api.github.com/repos/cube-js/cube.js/forks","keys_url":"https://api.github.com/repos/cube-js/cube.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cube-js/cube.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cube-js/cube.js/teams","hooks_url":"https://api.github.com/repos/cube-js/cube.js/hooks","issue_events_url":"https://api.github.com/repos/cube-js/cube.js/issues/events{/number}","events_url":"https://api.github.com/repos/cube-js/cube.js/events","assignees_url":"https://api.github.com/repos/cube-js/cube.js/assignees{/user}","branches_url":"https://api.github.com/repos/cube-js/cube.js/branches{/branch}","tags_url":"https://api.github.com/repos/cube-js/cube.js/tags","blobs_url":"https://api.github.com/repos/cube-js/cube.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cube-js/cube.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cube-js/cube.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/cube-js/cube.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cube-js/cube.js/statuses/{sha}","languages_url":"https://api.github.com/repos/cube-js/cube.js/languages","stargazers_url":"https://api.github.com/repos/cube-js/cube.js/stargazers","contributors_url":"https://api.github.com/repos/cube-js/cube.js/contributors","subscribers_url":"https://api.github.com/repos/cube-js/cube.js/subscribers","subscription_url":"https://api.github.com/repos/cube-js/cube.js/subscription","commits_url":"https://api.github.com/repos/cube-js/cube.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/cube-js/cube.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/cube-js/cube.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/cube-js/cube.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/cube-js/cube.js/contents/{+path}","compare_url":"https://api.github.com/repos/cube-js/cube.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cube-js/cube.js/merges","archive_url":"https://api.github.com/repos/cube-js/cube.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cube-js/cube.js/downloads","issues_url":"https://api.github.com/repos/cube-js/cube.js/issues{/number}","pulls_url":"https://api.github.com/repos/cube-js/cube.js/pulls{/number}","milestones_url":"https://api.github.com/repos/cube-js/cube.js/milestones{/number}","notifications_url":"https://api.github.com/repos/cube-js/cube.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cube-js/cube.js/labels{/name}","releases_url":"https://api.github.com/repos/cube-js/cube.js/releases{/id}","deployments_url":"https://api.github.com/repos/cube-js/cube.js/deployments","created_at":"2018-09-16T18:58:46Z","updated_at":"2019-11-23T17:13:11Z","pushed_at":"2019-11-23T07:41:17Z","git_url":"git://github.com/cube-js/cube.js.git","ssh_url":"git@github.com:cube-js/cube.js.git","clone_url":"https://github.com/cube-js/cube.js.git","svn_url":"https://github.com/cube-js/cube.js","homepage":"https://cube.dev","size":19549,"stargazers_count":5890,"watchers_count":5890,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":353,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":54,"license":null,"forks":353,"open_issues":54,"watchers":5890,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cube-js/cube.js/pulls/273"},"html":{"href":"https://github.com/cube-js/cube.js/pull/273"},"issue":{"href":"https://api.github.com/repos/cube-js/cube.js/issues/273"},"comments":{"href":"https://api.github.com/repos/cube-js/cube.js/issues/273/comments"},"review_comments":{"href":"https://api.github.com/repos/cube-js/cube.js/pulls/273/comments"},"review_comment":{"href":"https://api.github.com/repos/cube-js/cube.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cube-js/cube.js/pulls/273/commits"},"statuses":{"href":"https://api.github.com/repos/cube-js/cube.js/statuses/4705af080cd9549ff735f3ab6ea99dfd8de8b4ac"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"paveltiunov"}}