{"action":"created","comment":{"url":"https://api.github.com/repos/uwdata/compassql/pulls/comments/69666935","id":69666935,"diff_hunk":"@@ -184,22 +185,44 @@ describe('generate', function () {\n       };\n \n       const answerSet = generate(specQ, schema, stats);\n+      assert.equal(answerSet.length, 3);\n+      assert.equal((answerSet[0].getEncodingQueryByIndex(0).scale as ScaleQuery).type, ScaleType.TIME);\n+      assert.equal((answerSet[1].getEncodingQueryByIndex(0).scale as ScaleQuery).type, ScaleType.UTC);\n+      assert.equal((answerSet[2].getEncodingQueryByIndex(0).scale as ScaleQuery).type, undefined);\n+    });\n+\n+    it('should enumerate correct scaleType for temporal field with timeunit', () => { // working on rn\n+      const specQ = {\n+        mark: Mark.POINT,\n+        encodings: [\n+          {\n+            channel: Channel.X,\n+            scale: {type: {values: [ScaleType.TIME, ScaleType.UTC, ScaleType.ORDINAL, undefined]}},\n+            field: 'T',\n+            type: Type.TEMPORAL,\n+            timeUnit: TimeUnit.MINUTES\n+          }\n+        ]\n+      };\n+\n+      const answerSet = generate(specQ, schema, stats);\n       assert.equal(answerSet.length, 4);\n       assert.equal((answerSet[0].getEncodingQueryByIndex(0).scale as ScaleQuery).type, ScaleType.TIME);\n       assert.equal((answerSet[1].getEncodingQueryByIndex(0).scale as ScaleQuery).type, ScaleType.UTC);\n       assert.equal((answerSet[2].getEncodingQueryByIndex(0).scale as ScaleQuery).type, ScaleType.ORDINAL);\n       assert.equal((answerSet[3].getEncodingQueryByIndex(0).scale as ScaleQuery).type, undefined);\n     });\n \n-    it('should enumerate correct scaletype for ordinal field', () => {\n+    it('should enumerate correct scaleType for ordinal field with timeunit', () => {","path":"test/generate.test.ts","position":null,"original_position":59,"commit_id":"16b418c7b913dd23ff5ecefe1d51ef7fb71dc514","original_commit_id":"25b6560ed43193f408860db7e784ca1f75b63fe0","user":{"login":"kanitw","id":111269,"avatar_url":"https://avatars.githubusercontent.com/u/111269?v=3","gravatar_id":"","url":"https://api.github.com/users/kanitw","html_url":"https://github.com/kanitw","followers_url":"https://api.github.com/users/kanitw/followers","following_url":"https://api.github.com/users/kanitw/following{/other_user}","gists_url":"https://api.github.com/users/kanitw/gists{/gist_id}","starred_url":"https://api.github.com/users/kanitw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanitw/subscriptions","organizations_url":"https://api.github.com/users/kanitw/orgs","repos_url":"https://api.github.com/users/kanitw/repos","events_url":"https://api.github.com/users/kanitw/events{/privacy}","received_events_url":"https://api.github.com/users/kanitw/received_events","type":"User","site_admin":false},"body":"Similar to N, you shouldn't use O with timeUnit (at least that's how it works in Vega-Lite for now).  We might revise this in the future for O.   (But definitely, not for N) ","created_at":"2016-07-06T02:10:36Z","updated_at":"2016-07-06T02:10:36Z","html_url":"https://github.com/uwdata/compassql/pull/104#discussion_r69666935","pull_request_url":"https://api.github.com/repos/uwdata/compassql/pulls/104","_links":{"self":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/comments/69666935"},"html":{"href":"https://github.com/uwdata/compassql/pull/104#discussion_r69666935"},"pull_request":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/104"}}},"pull_request":{"url":"https://api.github.com/repos/uwdata/compassql/pulls/104","id":75737417,"html_url":"https://github.com/uwdata/compassql/pull/104","diff_url":"https://github.com/uwdata/compassql/pull/104.diff","patch_url":"https://github.com/uwdata/compassql/pull/104.patch","issue_url":"https://api.github.com/repos/uwdata/compassql/issues/104","number":104,"state":"open","locked":false,"title":"Scale and ScaleType Interface and Properties [WIP]","user":{"login":"felixcodes","id":17525561,"avatar_url":"https://avatars.githubusercontent.com/u/17525561?v=3","gravatar_id":"","url":"https://api.github.com/users/felixcodes","html_url":"https://github.com/felixcodes","followers_url":"https://api.github.com/users/felixcodes/followers","following_url":"https://api.github.com/users/felixcodes/following{/other_user}","gists_url":"https://api.github.com/users/felixcodes/gists{/gist_id}","starred_url":"https://api.github.com/users/felixcodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixcodes/subscriptions","organizations_url":"https://api.github.com/users/felixcodes/orgs","repos_url":"https://api.github.com/users/felixcodes/repos","events_url":"https://api.github.com/users/felixcodes/events{/privacy}","received_events_url":"https://api.github.com/users/felixcodes/received_events","type":"User","site_admin":false},"body":"This is part of issue #2 \r\n","created_at":"2016-06-29T23:14:32Z","updated_at":"2016-07-06T02:10:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f4d0ca4762546afb0213eaec181f339eba4a058","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/uwdata/compassql/pulls/104/commits","review_comments_url":"https://api.github.com/repos/uwdata/compassql/pulls/104/comments","review_comment_url":"https://api.github.com/repos/uwdata/compassql/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uwdata/compassql/issues/104/comments","statuses_url":"https://api.github.com/repos/uwdata/compassql/statuses/16b418c7b913dd23ff5ecefe1d51ef7fb71dc514","head":{"label":"uwdata:fo/enumerate_scale_properties","ref":"fo/enumerate_scale_properties","sha":"16b418c7b913dd23ff5ecefe1d51ef7fb71dc514","user":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"repo":{"id":58768960,"name":"compassql","full_name":"uwdata/compassql","owner":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uwdata/compassql","description":"CompassQL Query Language for visualization recommendation.","fork":false,"url":"https://api.github.com/repos/uwdata/compassql","forks_url":"https://api.github.com/repos/uwdata/compassql/forks","keys_url":"https://api.github.com/repos/uwdata/compassql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uwdata/compassql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uwdata/compassql/teams","hooks_url":"https://api.github.com/repos/uwdata/compassql/hooks","issue_events_url":"https://api.github.com/repos/uwdata/compassql/issues/events{/number}","events_url":"https://api.github.com/repos/uwdata/compassql/events","assignees_url":"https://api.github.com/repos/uwdata/compassql/assignees{/user}","branches_url":"https://api.github.com/repos/uwdata/compassql/branches{/branch}","tags_url":"https://api.github.com/repos/uwdata/compassql/tags","blobs_url":"https://api.github.com/repos/uwdata/compassql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uwdata/compassql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uwdata/compassql/git/refs{/sha}","trees_url":"https://api.github.com/repos/uwdata/compassql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uwdata/compassql/statuses/{sha}","languages_url":"https://api.github.com/repos/uwdata/compassql/languages","stargazers_url":"https://api.github.com/repos/uwdata/compassql/stargazers","contributors_url":"https://api.github.com/repos/uwdata/compassql/contributors","subscribers_url":"https://api.github.com/repos/uwdata/compassql/subscribers","subscription_url":"https://api.github.com/repos/uwdata/compassql/subscription","commits_url":"https://api.github.com/repos/uwdata/compassql/commits{/sha}","git_commits_url":"https://api.github.com/repos/uwdata/compassql/git/commits{/sha}","comments_url":"https://api.github.com/repos/uwdata/compassql/comments{/number}","issue_comment_url":"https://api.github.com/repos/uwdata/compassql/issues/comments{/number}","contents_url":"https://api.github.com/repos/uwdata/compassql/contents/{+path}","compare_url":"https://api.github.com/repos/uwdata/compassql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uwdata/compassql/merges","archive_url":"https://api.github.com/repos/uwdata/compassql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uwdata/compassql/downloads","issues_url":"https://api.github.com/repos/uwdata/compassql/issues{/number}","pulls_url":"https://api.github.com/repos/uwdata/compassql/pulls{/number}","milestones_url":"https://api.github.com/repos/uwdata/compassql/milestones{/number}","notifications_url":"https://api.github.com/repos/uwdata/compassql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uwdata/compassql/labels{/name}","releases_url":"https://api.github.com/repos/uwdata/compassql/releases{/id}","deployments_url":"https://api.github.com/repos/uwdata/compassql/deployments","created_at":"2016-05-13T20:01:53Z","updated_at":"2016-07-05T03:13:24Z","pushed_at":"2016-07-06T01:51:37Z","git_url":"git://github.com/uwdata/compassql.git","ssh_url":"git@github.com:uwdata/compassql.git","clone_url":"https://github.com/uwdata/compassql.git","svn_url":"https://github.com/uwdata/compassql","homepage":null,"size":651,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":49,"forks":0,"open_issues":49,"watchers":1,"default_branch":"master"}},"base":{"label":"uwdata:master","ref":"master","sha":"7f0d32c0e16891e9266eab8862ba88ba80c15c32","user":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"repo":{"id":58768960,"name":"compassql","full_name":"uwdata/compassql","owner":{"login":"uwdata","id":5448960,"avatar_url":"https://avatars.githubusercontent.com/u/5448960?v=3","gravatar_id":"","url":"https://api.github.com/users/uwdata","html_url":"https://github.com/uwdata","followers_url":"https://api.github.com/users/uwdata/followers","following_url":"https://api.github.com/users/uwdata/following{/other_user}","gists_url":"https://api.github.com/users/uwdata/gists{/gist_id}","starred_url":"https://api.github.com/users/uwdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwdata/subscriptions","organizations_url":"https://api.github.com/users/uwdata/orgs","repos_url":"https://api.github.com/users/uwdata/repos","events_url":"https://api.github.com/users/uwdata/events{/privacy}","received_events_url":"https://api.github.com/users/uwdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uwdata/compassql","description":"CompassQL Query Language for visualization recommendation.","fork":false,"url":"https://api.github.com/repos/uwdata/compassql","forks_url":"https://api.github.com/repos/uwdata/compassql/forks","keys_url":"https://api.github.com/repos/uwdata/compassql/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uwdata/compassql/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uwdata/compassql/teams","hooks_url":"https://api.github.com/repos/uwdata/compassql/hooks","issue_events_url":"https://api.github.com/repos/uwdata/compassql/issues/events{/number}","events_url":"https://api.github.com/repos/uwdata/compassql/events","assignees_url":"https://api.github.com/repos/uwdata/compassql/assignees{/user}","branches_url":"https://api.github.com/repos/uwdata/compassql/branches{/branch}","tags_url":"https://api.github.com/repos/uwdata/compassql/tags","blobs_url":"https://api.github.com/repos/uwdata/compassql/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uwdata/compassql/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uwdata/compassql/git/refs{/sha}","trees_url":"https://api.github.com/repos/uwdata/compassql/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uwdata/compassql/statuses/{sha}","languages_url":"https://api.github.com/repos/uwdata/compassql/languages","stargazers_url":"https://api.github.com/repos/uwdata/compassql/stargazers","contributors_url":"https://api.github.com/repos/uwdata/compassql/contributors","subscribers_url":"https://api.github.com/repos/uwdata/compassql/subscribers","subscription_url":"https://api.github.com/repos/uwdata/compassql/subscription","commits_url":"https://api.github.com/repos/uwdata/compassql/commits{/sha}","git_commits_url":"https://api.github.com/repos/uwdata/compassql/git/commits{/sha}","comments_url":"https://api.github.com/repos/uwdata/compassql/comments{/number}","issue_comment_url":"https://api.github.com/repos/uwdata/compassql/issues/comments{/number}","contents_url":"https://api.github.com/repos/uwdata/compassql/contents/{+path}","compare_url":"https://api.github.com/repos/uwdata/compassql/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uwdata/compassql/merges","archive_url":"https://api.github.com/repos/uwdata/compassql/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uwdata/compassql/downloads","issues_url":"https://api.github.com/repos/uwdata/compassql/issues{/number}","pulls_url":"https://api.github.com/repos/uwdata/compassql/pulls{/number}","milestones_url":"https://api.github.com/repos/uwdata/compassql/milestones{/number}","notifications_url":"https://api.github.com/repos/uwdata/compassql/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uwdata/compassql/labels{/name}","releases_url":"https://api.github.com/repos/uwdata/compassql/releases{/id}","deployments_url":"https://api.github.com/repos/uwdata/compassql/deployments","created_at":"2016-05-13T20:01:53Z","updated_at":"2016-07-05T03:13:24Z","pushed_at":"2016-07-06T01:51:37Z","git_url":"git://github.com/uwdata/compassql.git","ssh_url":"git@github.com:uwdata/compassql.git","clone_url":"https://github.com/uwdata/compassql.git","svn_url":"https://github.com/uwdata/compassql","homepage":null,"size":651,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":49,"forks":0,"open_issues":49,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/104"},"html":{"href":"https://github.com/uwdata/compassql/pull/104"},"issue":{"href":"https://api.github.com/repos/uwdata/compassql/issues/104"},"comments":{"href":"https://api.github.com/repos/uwdata/compassql/issues/104/comments"},"review_comments":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/104/comments"},"review_comment":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uwdata/compassql/pulls/104/commits"},"statuses":{"href":"https://api.github.com/repos/uwdata/compassql/statuses/16b418c7b913dd23ff5ecefe1d51ef7fb71dc514"}}}}
{"actor":{"display_login":"kanitw"}}