{"action":"created","comment":{"url":"https://api.github.com/repos/vega/vega-lite/pulls/comments/111690668","pull_request_review_id":32950140,"id":111690668,"diff_hunk":"@@ -1,14 +1,34 @@\n-import {isUrlData} from '../../data';\n import {DateTime, isDateTime} from '../../datetime';\n import {FieldDef, isCount} from '../../fielddef';\n import {isEqualFilter, isOneOfFilter, isRangeFilter} from '../../filter';\n+import * as log from '../../log';\n+import {CalculateTransform, FilterTransform, isCalculate, isFilter} from '../../transform';\n import {QUANTITATIVE, TEMPORAL} from '../../type';\n import {Dict, extend, isArray, isNumber, isString, keys} from '../../util';\n-\n-import {CalculateTransform, FilterTransform, isCalculate, isFilter} from '../../transform';\n-import {Model} from './../model';\n+import {VgFormulaTransform} from '../../vega.schema';\n+import {Model} from '../model';\n import {DataFlowNode} from './dataflow';\n \n+\n+function parseExpression(field: string, parse: string): string {\n+  const f = `datum[\"${field}\"]`;\n+  if (parse === 'number') {\n+    return `toNumber(${f})`;\n+  } else if (parse === 'boolean') {\n+    return `toBoolean(${f})`;\n+  } else if (parse === 'string') {\n+    return `toString(${f})`;\n+  } else if (parse === 'date') {\n+    return `toDate(${f})`;\n+  } else if (parse.indexOf('date:') === 0) {\n+    const specifier = parse.slice(6, parse.length - 1);  // specifier is in \"\" or ''\n+    return `timeParse(${f},\"${specifier}\")`;","path":"src/compile/data/formatparse.ts","position":30,"original_position":29,"commit_id":"af445788759fea7a26ab1c2cd5dd8277c0c3c67d","original_commit_id":"067184dd3dc700dcd8e66aec5218b620409f228b","user":{"login":"domoritz","id":589034,"avatar_url":"https://avatars1.githubusercontent.com/u/589034?v=3","gravatar_id":"","url":"https://api.github.com/users/domoritz","html_url":"https://github.com/domoritz","followers_url":"https://api.github.com/users/domoritz/followers","following_url":"https://api.github.com/users/domoritz/following{/other_user}","gists_url":"https://api.github.com/users/domoritz/gists{/gist_id}","starred_url":"https://api.github.com/users/domoritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domoritz/subscriptions","organizations_url":"https://api.github.com/users/domoritz/orgs","repos_url":"https://api.github.com/users/domoritz/repos","events_url":"https://api.github.com/users/domoritz/events{/privacy}","received_events_url":"https://api.github.com/users/domoritz/received_events","type":"User","site_admin":false},"body":"Then we should sue it everywhere (whenever we generate `datum[...]`). Moved to https://github.com/vega/vega-lite/issues/2179","created_at":"2017-04-16T19:44:17Z","updated_at":"2017-04-16T19:44:17Z","html_url":"https://github.com/vega/vega-lite/pull/2174#discussion_r111690668","pull_request_url":"https://api.github.com/repos/vega/vega-lite/pulls/2174","_links":{"self":{"href":"https://api.github.com/repos/vega/vega-lite/pulls/comments/111690668"},"html":{"href":"https://github.com/vega/vega-lite/pull/2174#discussion_r111690668"},"pull_request":{"href":"https://api.github.com/repos/vega/vega-lite/pulls/2174"}}},"pull_request":{"url":"https://api.github.com/repos/vega/vega-lite/pulls/2174","id":116044855,"html_url":"https://github.com/vega/vega-lite/pull/2174","diff_url":"https://github.com/vega/vega-lite/pull/2174.diff","patch_url":"https://github.com/vega/vega-lite/pull/2174.patch","issue_url":"https://api.github.com/repos/vega/vega-lite/issues/2174","number":2174,"state":"open","locked":false,"title":"Implement format parse as expressions.","user":{"login":"domoritz","id":589034,"avatar_url":"https://avatars1.githubusercontent.com/u/589034?v=3","gravatar_id":"","url":"https://api.github.com/users/domoritz","html_url":"https://github.com/domoritz","followers_url":"https://api.github.com/users/domoritz/followers","following_url":"https://api.github.com/users/domoritz/following{/other_user}","gists_url":"https://api.github.com/users/domoritz/gists{/gist_id}","starred_url":"https://api.github.com/users/domoritz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domoritz/subscriptions","organizations_url":"https://api.github.com/users/domoritz/orgs","repos_url":"https://api.github.com/users/domoritz/repos","events_url":"https://api.github.com/users/domoritz/events{/privacy}","received_events_url":"https://api.github.com/users/domoritz/received_events","type":"User","site_admin":false},"body":"Why: Avoids problems with merging up parse and allows us to have parse anywhere is the dataflow tree (not just next to source). \r\n\r\nDoesn't work until we have https://github.com/vega/vega-expression/issues/13\r\n  \r\n","created_at":"2017-04-16T01:22:57Z","updated_at":"2017-04-16T19:44:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0bf147dcf18135d691606acbd6174e201f0415e0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vega/vega-lite/pulls/2174/commits","review_comments_url":"https://api.github.com/repos/vega/vega-lite/pulls/2174/comments","review_comment_url":"https://api.github.com/repos/vega/vega-lite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vega/vega-lite/issues/2174/comments","statuses_url":"https://api.github.com/repos/vega/vega-lite/statuses/af445788759fea7a26ab1c2cd5dd8277c0c3c67d","head":{"label":"vega:dom/parse","ref":"dom/parse","sha":"af445788759fea7a26ab1c2cd5dd8277c0c3c67d","user":{"login":"vega","id":11796929,"avatar_url":"https://avatars0.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"repo":{"id":26931359,"name":"vega-lite","full_name":"vega/vega-lite","owner":{"login":"vega","id":11796929,"avatar_url":"https://avatars0.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vega/vega-lite","description":"A high-level grammar for visual analysis, built on top of Vega.","fork":false,"url":"https://api.github.com/repos/vega/vega-lite","forks_url":"https://api.github.com/repos/vega/vega-lite/forks","keys_url":"https://api.github.com/repos/vega/vega-lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vega/vega-lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vega/vega-lite/teams","hooks_url":"https://api.github.com/repos/vega/vega-lite/hooks","issue_events_url":"https://api.github.com/repos/vega/vega-lite/issues/events{/number}","events_url":"https://api.github.com/repos/vega/vega-lite/events","assignees_url":"https://api.github.com/repos/vega/vega-lite/assignees{/user}","branches_url":"https://api.github.com/repos/vega/vega-lite/branches{/branch}","tags_url":"https://api.github.com/repos/vega/vega-lite/tags","blobs_url":"https://api.github.com/repos/vega/vega-lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vega/vega-lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vega/vega-lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/vega/vega-lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vega/vega-lite/statuses/{sha}","languages_url":"https://api.github.com/repos/vega/vega-lite/languages","stargazers_url":"https://api.github.com/repos/vega/vega-lite/stargazers","contributors_url":"https://api.github.com/repos/vega/vega-lite/contributors","subscribers_url":"https://api.github.com/repos/vega/vega-lite/subscribers","subscription_url":"https://api.github.com/repos/vega/vega-lite/subscription","commits_url":"https://api.github.com/repos/vega/vega-lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/vega/vega-lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/vega/vega-lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/vega/vega-lite/issues/comments{/number}","contents_url":"https://api.github.com/repos/vega/vega-lite/contents/{+path}","compare_url":"https://api.github.com/repos/vega/vega-lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vega/vega-lite/merges","archive_url":"https://api.github.com/repos/vega/vega-lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vega/vega-lite/downloads","issues_url":"https://api.github.com/repos/vega/vega-lite/issues{/number}","pulls_url":"https://api.github.com/repos/vega/vega-lite/pulls{/number}","milestones_url":"https://api.github.com/repos/vega/vega-lite/milestones{/number}","notifications_url":"https://api.github.com/repos/vega/vega-lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vega/vega-lite/labels{/name}","releases_url":"https://api.github.com/repos/vega/vega-lite/releases{/id}","deployments_url":"https://api.github.com/repos/vega/vega-lite/deployments","created_at":"2014-11-20T20:52:04Z","updated_at":"2017-04-14T12:07:21Z","pushed_at":"2017-04-16T19:42:39Z","git_url":"git://github.com/vega/vega-lite.git","ssh_url":"git@github.com:vega/vega-lite.git","clone_url":"https://github.com/vega/vega-lite.git","svn_url":"https://github.com/vega/vega-lite","homepage":"https://vega.github.io/vega-lite/","size":28355,"stargazers_count":712,"watchers_count":712,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":77,"mirror_url":null,"open_issues_count":212,"forks":77,"open_issues":212,"watchers":712,"default_branch":"master"}},"base":{"label":"vega:master","ref":"master","sha":"6c4532c14c2d34d3c466cde5086b20473459c20e","user":{"login":"vega","id":11796929,"avatar_url":"https://avatars0.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"repo":{"id":26931359,"name":"vega-lite","full_name":"vega/vega-lite","owner":{"login":"vega","id":11796929,"avatar_url":"https://avatars0.githubusercontent.com/u/11796929?v=3","gravatar_id":"","url":"https://api.github.com/users/vega","html_url":"https://github.com/vega","followers_url":"https://api.github.com/users/vega/followers","following_url":"https://api.github.com/users/vega/following{/other_user}","gists_url":"https://api.github.com/users/vega/gists{/gist_id}","starred_url":"https://api.github.com/users/vega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vega/subscriptions","organizations_url":"https://api.github.com/users/vega/orgs","repos_url":"https://api.github.com/users/vega/repos","events_url":"https://api.github.com/users/vega/events{/privacy}","received_events_url":"https://api.github.com/users/vega/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vega/vega-lite","description":"A high-level grammar for visual analysis, built on top of Vega.","fork":false,"url":"https://api.github.com/repos/vega/vega-lite","forks_url":"https://api.github.com/repos/vega/vega-lite/forks","keys_url":"https://api.github.com/repos/vega/vega-lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vega/vega-lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vega/vega-lite/teams","hooks_url":"https://api.github.com/repos/vega/vega-lite/hooks","issue_events_url":"https://api.github.com/repos/vega/vega-lite/issues/events{/number}","events_url":"https://api.github.com/repos/vega/vega-lite/events","assignees_url":"https://api.github.com/repos/vega/vega-lite/assignees{/user}","branches_url":"https://api.github.com/repos/vega/vega-lite/branches{/branch}","tags_url":"https://api.github.com/repos/vega/vega-lite/tags","blobs_url":"https://api.github.com/repos/vega/vega-lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vega/vega-lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vega/vega-lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/vega/vega-lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vega/vega-lite/statuses/{sha}","languages_url":"https://api.github.com/repos/vega/vega-lite/languages","stargazers_url":"https://api.github.com/repos/vega/vega-lite/stargazers","contributors_url":"https://api.github.com/repos/vega/vega-lite/contributors","subscribers_url":"https://api.github.com/repos/vega/vega-lite/subscribers","subscription_url":"https://api.github.com/repos/vega/vega-lite/subscription","commits_url":"https://api.github.com/repos/vega/vega-lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/vega/vega-lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/vega/vega-lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/vega/vega-lite/issues/comments{/number}","contents_url":"https://api.github.com/repos/vega/vega-lite/contents/{+path}","compare_url":"https://api.github.com/repos/vega/vega-lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vega/vega-lite/merges","archive_url":"https://api.github.com/repos/vega/vega-lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vega/vega-lite/downloads","issues_url":"https://api.github.com/repos/vega/vega-lite/issues{/number}","pulls_url":"https://api.github.com/repos/vega/vega-lite/pulls{/number}","milestones_url":"https://api.github.com/repos/vega/vega-lite/milestones{/number}","notifications_url":"https://api.github.com/repos/vega/vega-lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vega/vega-lite/labels{/name}","releases_url":"https://api.github.com/repos/vega/vega-lite/releases{/id}","deployments_url":"https://api.github.com/repos/vega/vega-lite/deployments","created_at":"2014-11-20T20:52:04Z","updated_at":"2017-04-14T12:07:21Z","pushed_at":"2017-04-16T19:42:39Z","git_url":"git://github.com/vega/vega-lite.git","ssh_url":"git@github.com:vega/vega-lite.git","clone_url":"https://github.com/vega/vega-lite.git","svn_url":"https://github.com/vega/vega-lite","homepage":"https://vega.github.io/vega-lite/","size":28355,"stargazers_count":712,"watchers_count":712,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":77,"mirror_url":null,"open_issues_count":212,"forks":77,"open_issues":212,"watchers":712,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vega/vega-lite/pulls/2174"},"html":{"href":"https://github.com/vega/vega-lite/pull/2174"},"issue":{"href":"https://api.github.com/repos/vega/vega-lite/issues/2174"},"comments":{"href":"https://api.github.com/repos/vega/vega-lite/issues/2174/comments"},"review_comments":{"href":"https://api.github.com/repos/vega/vega-lite/pulls/2174/comments"},"review_comment":{"href":"https://api.github.com/repos/vega/vega-lite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vega/vega-lite/pulls/2174/commits"},"statuses":{"href":"https://api.github.com/repos/vega/vega-lite/statuses/af445788759fea7a26ab1c2cd5dd8277c0c3c67d"}}}}
{"actor":{"display_login":"domoritz"}}