{"action":"created","comment":{"url":"https://api.github.com/repos/CartoDB/camshaft/pulls/comments/110941984","pull_request_review_id":32149932,"id":110941984,"diff_hunk":"@@ -87,20 +87,22 @@ DatabaseService.prototype.getMetadataFromAffectedTables = function(node, skip, c\n         var defaultLastUpdatedTime = new Date('1970-01-01T00:00:00.000Z');\n         var affectedTables = [];\n         var lastUpdatedTimes = [];\n-        var rows = (Array.isArray(resultSet.rows) && resultSet.rows.length > 0) ?\n-            resultSet.rows :\n-            [{updated_at: defaultLastUpdatedTime, schema_name: null, table_name: null}];\n+        var rows = Array.isArray(resultSet.rows) ? resultSet.rows : [];","path":"lib/service/database.js","position":null,"original_position":7,"commit_id":"b113b2dd15ec72544ba614c3fbb7b7fa9f25edab","original_commit_id":"d9275beb294241067bd745e5dab29567c12a8a9a","user":{"login":"dgaubert","id":1936888,"avatar_url":"https://avatars3.githubusercontent.com/u/1936888?v=3","gravatar_id":"","url":"https://api.github.com/users/dgaubert","html_url":"https://github.com/dgaubert","followers_url":"https://api.github.com/users/dgaubert/followers","following_url":"https://api.github.com/users/dgaubert/following{/other_user}","gists_url":"https://api.github.com/users/dgaubert/gists{/gist_id}","starred_url":"https://api.github.com/users/dgaubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgaubert/subscriptions","organizations_url":"https://api.github.com/users/dgaubert/orgs","repos_url":"https://api.github.com/users/dgaubert/repos","events_url":"https://api.github.com/users/dgaubert/events{/privacy}","received_events_url":"https://api.github.com/users/dgaubert/received_events","type":"User","site_admin":false},"body":"with `Array.isArray(resultSet.rows)` we are ensuring we are playing with an array.","created_at":"2017-04-11T15:55:52Z","updated_at":"2017-04-11T15:55:52Z","html_url":"https://github.com/CartoDB/camshaft/pull/282#discussion_r110941984","pull_request_url":"https://api.github.com/repos/CartoDB/camshaft/pulls/282","_links":{"self":{"href":"https://api.github.com/repos/CartoDB/camshaft/pulls/comments/110941984"},"html":{"href":"https://github.com/CartoDB/camshaft/pull/282#discussion_r110941984"},"pull_request":{"href":"https://api.github.com/repos/CartoDB/camshaft/pulls/282"}}},"pull_request":{"url":"https://api.github.com/repos/CartoDB/camshaft/pulls/282","id":115343378,"html_url":"https://github.com/CartoDB/camshaft/pull/282","diff_url":"https://github.com/CartoDB/camshaft/pull/282.diff","patch_url":"https://github.com/CartoDB/camshaft/pull/282.patch","issue_url":"https://api.github.com/repos/CartoDB/camshaft/issues/282","number":282,"state":"open","locked":false,"title":"Fix invalid date get metadata from affected tables","user":{"login":"dgaubert","id":1936888,"avatar_url":"https://avatars3.githubusercontent.com/u/1936888?v=3","gravatar_id":"","url":"https://api.github.com/users/dgaubert","html_url":"https://github.com/dgaubert","followers_url":"https://api.github.com/users/dgaubert/followers","following_url":"https://api.github.com/users/dgaubert/following{/other_user}","gists_url":"https://api.github.com/users/dgaubert/gists{/gist_id}","starred_url":"https://api.github.com/users/dgaubert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgaubert/subscriptions","organizations_url":"https://api.github.com/users/dgaubert/orgs","repos_url":"https://api.github.com/users/dgaubert/repos","events_url":"https://api.github.com/users/dgaubert/events{/privacy}","received_events_url":"https://api.github.com/users/dgaubert/received_events","type":"User","site_admin":false},"body":"Fixes #279","created_at":"2017-04-11T15:06:05Z","updated_at":"2017-04-11T15:55:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d4c827f2453b19f9121a6cc34dd7bd346abedae","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CartoDB/camshaft/pulls/282/commits","review_comments_url":"https://api.github.com/repos/CartoDB/camshaft/pulls/282/comments","review_comment_url":"https://api.github.com/repos/CartoDB/camshaft/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CartoDB/camshaft/issues/282/comments","statuses_url":"https://api.github.com/repos/CartoDB/camshaft/statuses/b113b2dd15ec72544ba614c3fbb7b7fa9f25edab","head":{"label":"CartoDB:279-fix-invalid-date-getMetadataFromAffectedTables","ref":"279-fix-invalid-date-getMetadataFromAffectedTables","sha":"b113b2dd15ec72544ba614c3fbb7b7fa9f25edab","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars3.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":51438175,"name":"camshaft","full_name":"CartoDB/camshaft","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars3.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/camshaft","description":"Analysis library to create data views from queries","fork":false,"url":"https://api.github.com/repos/CartoDB/camshaft","forks_url":"https://api.github.com/repos/CartoDB/camshaft/forks","keys_url":"https://api.github.com/repos/CartoDB/camshaft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/camshaft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/camshaft/teams","hooks_url":"https://api.github.com/repos/CartoDB/camshaft/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/camshaft/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/camshaft/events","assignees_url":"https://api.github.com/repos/CartoDB/camshaft/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/camshaft/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/camshaft/tags","blobs_url":"https://api.github.com/repos/CartoDB/camshaft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/camshaft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/camshaft/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/camshaft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/camshaft/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/camshaft/languages","stargazers_url":"https://api.github.com/repos/CartoDB/camshaft/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/camshaft/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/camshaft/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/camshaft/subscription","commits_url":"https://api.github.com/repos/CartoDB/camshaft/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/camshaft/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/camshaft/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/camshaft/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/camshaft/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/camshaft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/camshaft/merges","archive_url":"https://api.github.com/repos/CartoDB/camshaft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/camshaft/downloads","issues_url":"https://api.github.com/repos/CartoDB/camshaft/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/camshaft/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/camshaft/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/camshaft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/camshaft/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/camshaft/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/camshaft/deployments","created_at":"2016-02-10T11:54:46Z","updated_at":"2017-02-23T01:49:16Z","pushed_at":"2017-04-11T15:52:03Z","git_url":"git://github.com/CartoDB/camshaft.git","ssh_url":"git@github.com:CartoDB/camshaft.git","clone_url":"https://github.com/CartoDB/camshaft.git","svn_url":"https://github.com/CartoDB/camshaft","homepage":null,"size":926,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":60,"forks":3,"open_issues":60,"watchers":12,"default_branch":"master"}},"base":{"label":"CartoDB:master","ref":"master","sha":"4ae6de5b6604d8e8d8e91ba8653bea8440356be5","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars3.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":51438175,"name":"camshaft","full_name":"CartoDB/camshaft","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars3.githubusercontent.com/u/1799254?v=3","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/camshaft","description":"Analysis library to create data views from queries","fork":false,"url":"https://api.github.com/repos/CartoDB/camshaft","forks_url":"https://api.github.com/repos/CartoDB/camshaft/forks","keys_url":"https://api.github.com/repos/CartoDB/camshaft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/camshaft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/camshaft/teams","hooks_url":"https://api.github.com/repos/CartoDB/camshaft/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/camshaft/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/camshaft/events","assignees_url":"https://api.github.com/repos/CartoDB/camshaft/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/camshaft/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/camshaft/tags","blobs_url":"https://api.github.com/repos/CartoDB/camshaft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/camshaft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/camshaft/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/camshaft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/camshaft/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/camshaft/languages","stargazers_url":"https://api.github.com/repos/CartoDB/camshaft/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/camshaft/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/camshaft/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/camshaft/subscription","commits_url":"https://api.github.com/repos/CartoDB/camshaft/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/camshaft/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/camshaft/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/camshaft/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/camshaft/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/camshaft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/camshaft/merges","archive_url":"https://api.github.com/repos/CartoDB/camshaft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/camshaft/downloads","issues_url":"https://api.github.com/repos/CartoDB/camshaft/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/camshaft/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/camshaft/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/camshaft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/camshaft/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/camshaft/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/camshaft/deployments","created_at":"2016-02-10T11:54:46Z","updated_at":"2017-02-23T01:49:16Z","pushed_at":"2017-04-11T15:52:03Z","git_url":"git://github.com/CartoDB/camshaft.git","ssh_url":"git@github.com:CartoDB/camshaft.git","clone_url":"https://github.com/CartoDB/camshaft.git","svn_url":"https://github.com/CartoDB/camshaft","homepage":null,"size":926,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":60,"forks":3,"open_issues":60,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CartoDB/camshaft/pulls/282"},"html":{"href":"https://github.com/CartoDB/camshaft/pull/282"},"issue":{"href":"https://api.github.com/repos/CartoDB/camshaft/issues/282"},"comments":{"href":"https://api.github.com/repos/CartoDB/camshaft/issues/282/comments"},"review_comments":{"href":"https://api.github.com/repos/CartoDB/camshaft/pulls/282/comments"},"review_comment":{"href":"https://api.github.com/repos/CartoDB/camshaft/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CartoDB/camshaft/pulls/282/commits"},"statuses":{"href":"https://api.github.com/repos/CartoDB/camshaft/statuses/b113b2dd15ec72544ba614c3fbb7b7fa9f25edab"}}}}
{"actor":{"display_login":"dgaubert"}}