{"action":"created","comment":{"url":"https://api.github.com/repos/h2oai/h2o-3/pulls/comments/91596441","pull_request_review_id":12106613,"id":91596441,"diff_hunk":"@@ -2799,16 +2800,22 @@ destination_frame.guess <- function(x) {\n #'   stopifnot(is.h2o(hs), dim(hs)==dim(m))\n #' }\n #' }\n-as.h2o <- function(x, destination_frame=\"\", ...) {\n-  .key.validate(destination_frame)\n+as.h2o <- function(x, destination_frame=NULL, ...) {\n+  if( !is.null(destination_frame) ) {\n+    if( !(length(destination_frame)==1L && is.character(destination_frame)) )\n+      stop(\"Argument 'destination_frame' must be a scalar character.\")\n+    .key.validate(destination_frame)\n+    if( destination_frame %in% as.character(h2o.ls()$key) )\n+      stop(paste0(\"Provided 'destination_frame' the H2O frame key '\", destination_frame , \"' already exists in your H2O Cluster. Please choose another key.\"))","path":"h2o-r/h2o-package/R/frame.R","position":31,"original_position":31,"commit_id":"ad863dde53030728e787e1359e44a29e722c39d0","original_commit_id":"ad863dde53030728e787e1359e44a29e722c39d0","user":{"login":"jangorecki","id":3627377,"avatar_url":"https://avatars.githubusercontent.com/u/3627377?v=3","gravatar_id":"","url":"https://api.github.com/users/jangorecki","html_url":"https://github.com/jangorecki","followers_url":"https://api.github.com/users/jangorecki/followers","following_url":"https://api.github.com/users/jangorecki/following{/other_user}","gists_url":"https://api.github.com/users/jangorecki/gists{/gist_id}","starred_url":"https://api.github.com/users/jangorecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jangorecki/subscriptions","organizations_url":"https://api.github.com/users/jangorecki/orgs","repos_url":"https://api.github.com/users/jangorecki/repos","events_url":"https://api.github.com/users/jangorecki/events{/privacy}","received_events_url":"https://api.github.com/users/jangorecki/received_events","type":"User","site_admin":false},"body":"@tomkraljevic So this should overwrite existing frame? this may be problem for H2O to which multiple users are connected. Much safer to add `overwrite = FALSE` and ask users confirm they want to replace existing frame. `sparklyr::copy_to` uses `overwrite = FALSE` by default so it can be eventually expected behaviour for users comings from sparklyr.","created_at":"2016-12-08T20:07:41Z","updated_at":"2016-12-08T20:07:41Z","html_url":"https://github.com/h2oai/h2o-3/pull/454#discussion_r91596441","pull_request_url":"https://api.github.com/repos/h2oai/h2o-3/pulls/454","_links":{"self":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/comments/91596441"},"html":{"href":"https://github.com/h2oai/h2o-3/pull/454#discussion_r91596441"},"pull_request":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/454"}}},"pull_request":{"url":"https://api.github.com/repos/h2oai/h2o-3/pulls/454","id":91902230,"html_url":"https://github.com/h2oai/h2o-3/pull/454","diff_url":"https://github.com/h2oai/h2o-3/pull/454.diff","patch_url":"https://github.com/h2oai/h2o-3/pull/454.patch","issue_url":"https://api.github.com/repos/h2oai/h2o-3/issues/454","number":454,"state":"open","locked":false,"title":"as.h2o destination_frame handling duplicates, closes PUBDEV-3608","user":{"login":"jangorecki","id":3627377,"avatar_url":"https://avatars.githubusercontent.com/u/3627377?v=3","gravatar_id":"","url":"https://api.github.com/users/jangorecki","html_url":"https://github.com/jangorecki","followers_url":"https://api.github.com/users/jangorecki/followers","following_url":"https://api.github.com/users/jangorecki/following{/other_user}","gists_url":"https://api.github.com/users/jangorecki/gists{/gist_id}","starred_url":"https://api.github.com/users/jangorecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jangorecki/subscriptions","organizations_url":"https://api.github.com/users/jangorecki/orgs","repos_url":"https://api.github.com/users/jangorecki/repos","events_url":"https://api.github.com/users/jangorecki/events{/privacy}","received_events_url":"https://api.github.com/users/jangorecki/received_events","type":"User","site_admin":false},"body":"Unit tests in a new structure - moving towards PUBDEV-3611.\r\nDefault argument value is changing in `as.h2o` definition but behaviour stays the same. It will now raise error if user will try to import frame to existing key. Unit tests includes as.h2o generic method tests.\r\nTo maintain properly `substitute(x)` as h2o frame key, when calling as.h2o.* methods directly we should always provide `destination_frame`, can be `deparse(substitute(x))`. `x` name substitution must happen only once, in the first called as.h2o.* method, then `destination_frame` must be passed to further methods. When calling `as.h2o` generic it is of course not necessary. This way we ensure that variable name is properly substituted.\r\n","created_at":"2016-11-02T03:10:15Z","updated_at":"2016-12-08T20:07:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1edc255fd22b2ced6ee1302e60cce557e5e6f51c","assignee":{"login":"tomasnykodym","id":1709201,"avatar_url":"https://avatars.githubusercontent.com/u/1709201?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasnykodym","html_url":"https://github.com/tomasnykodym","followers_url":"https://api.github.com/users/tomasnykodym/followers","following_url":"https://api.github.com/users/tomasnykodym/following{/other_user}","gists_url":"https://api.github.com/users/tomasnykodym/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasnykodym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasnykodym/subscriptions","organizations_url":"https://api.github.com/users/tomasnykodym/orgs","repos_url":"https://api.github.com/users/tomasnykodym/repos","events_url":"https://api.github.com/users/tomasnykodym/events{/privacy}","received_events_url":"https://api.github.com/users/tomasnykodym/received_events","type":"User","site_admin":false},"assignees":[{"login":"tomasnykodym","id":1709201,"avatar_url":"https://avatars.githubusercontent.com/u/1709201?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasnykodym","html_url":"https://github.com/tomasnykodym","followers_url":"https://api.github.com/users/tomasnykodym/followers","following_url":"https://api.github.com/users/tomasnykodym/following{/other_user}","gists_url":"https://api.github.com/users/tomasnykodym/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasnykodym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasnykodym/subscriptions","organizations_url":"https://api.github.com/users/tomasnykodym/orgs","repos_url":"https://api.github.com/users/tomasnykodym/repos","events_url":"https://api.github.com/users/tomasnykodym/events{/privacy}","received_events_url":"https://api.github.com/users/tomasnykodym/received_events","type":"User","site_admin":false},{"login":"tomkraljevic","id":4442567,"avatar_url":"https://avatars.githubusercontent.com/u/4442567?v=3","gravatar_id":"","url":"https://api.github.com/users/tomkraljevic","html_url":"https://github.com/tomkraljevic","followers_url":"https://api.github.com/users/tomkraljevic/followers","following_url":"https://api.github.com/users/tomkraljevic/following{/other_user}","gists_url":"https://api.github.com/users/tomkraljevic/gists{/gist_id}","starred_url":"https://api.github.com/users/tomkraljevic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomkraljevic/subscriptions","organizations_url":"https://api.github.com/users/tomkraljevic/orgs","repos_url":"https://api.github.com/users/tomkraljevic/repos","events_url":"https://api.github.com/users/tomkraljevic/events{/privacy}","received_events_url":"https://api.github.com/users/tomkraljevic/received_events","type":"User","site_admin":false},{"login":"navdeep-G","id":10055668,"avatar_url":"https://avatars.githubusercontent.com/u/10055668?v=3","gravatar_id":"","url":"https://api.github.com/users/navdeep-G","html_url":"https://github.com/navdeep-G","followers_url":"https://api.github.com/users/navdeep-G/followers","following_url":"https://api.github.com/users/navdeep-G/following{/other_user}","gists_url":"https://api.github.com/users/navdeep-G/gists{/gist_id}","starred_url":"https://api.github.com/users/navdeep-G/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navdeep-G/subscriptions","organizations_url":"https://api.github.com/users/navdeep-G/orgs","repos_url":"https://api.github.com/users/navdeep-G/repos","events_url":"https://api.github.com/users/navdeep-G/events{/privacy}","received_events_url":"https://api.github.com/users/navdeep-G/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/h2oai/h2o-3/pulls/454/commits","review_comments_url":"https://api.github.com/repos/h2oai/h2o-3/pulls/454/comments","review_comment_url":"https://api.github.com/repos/h2oai/h2o-3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/h2oai/h2o-3/issues/454/comments","statuses_url":"https://api.github.com/repos/h2oai/h2o-3/statuses/ad863dde53030728e787e1359e44a29e722c39d0","head":{"label":"jangorecki:JG_PUBDEV-3608_handle-duplicated-keys","ref":"JG_PUBDEV-3608_handle-duplicated-keys","sha":"ad863dde53030728e787e1359e44a29e722c39d0","user":{"login":"jangorecki","id":3627377,"avatar_url":"https://avatars.githubusercontent.com/u/3627377?v=3","gravatar_id":"","url":"https://api.github.com/users/jangorecki","html_url":"https://github.com/jangorecki","followers_url":"https://api.github.com/users/jangorecki/followers","following_url":"https://api.github.com/users/jangorecki/following{/other_user}","gists_url":"https://api.github.com/users/jangorecki/gists{/gist_id}","starred_url":"https://api.github.com/users/jangorecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jangorecki/subscriptions","organizations_url":"https://api.github.com/users/jangorecki/orgs","repos_url":"https://api.github.com/users/jangorecki/repos","events_url":"https://api.github.com/users/jangorecki/events{/privacy}","received_events_url":"https://api.github.com/users/jangorecki/received_events","type":"User","site_admin":false},"repo":{"id":60880478,"name":"h2o-3","full_name":"jangorecki/h2o-3","owner":{"login":"jangorecki","id":3627377,"avatar_url":"https://avatars.githubusercontent.com/u/3627377?v=3","gravatar_id":"","url":"https://api.github.com/users/jangorecki","html_url":"https://github.com/jangorecki","followers_url":"https://api.github.com/users/jangorecki/followers","following_url":"https://api.github.com/users/jangorecki/following{/other_user}","gists_url":"https://api.github.com/users/jangorecki/gists{/gist_id}","starred_url":"https://api.github.com/users/jangorecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jangorecki/subscriptions","organizations_url":"https://api.github.com/users/jangorecki/orgs","repos_url":"https://api.github.com/users/jangorecki/repos","events_url":"https://api.github.com/users/jangorecki/events{/privacy}","received_events_url":"https://api.github.com/users/jangorecki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jangorecki/h2o-3","description":"Fast Scalable Machine Learning API For Smarter Applications (Deep Learning, GBM, GLM...)","fork":true,"url":"https://api.github.com/repos/jangorecki/h2o-3","forks_url":"https://api.github.com/repos/jangorecki/h2o-3/forks","keys_url":"https://api.github.com/repos/jangorecki/h2o-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jangorecki/h2o-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jangorecki/h2o-3/teams","hooks_url":"https://api.github.com/repos/jangorecki/h2o-3/hooks","issue_events_url":"https://api.github.com/repos/jangorecki/h2o-3/issues/events{/number}","events_url":"https://api.github.com/repos/jangorecki/h2o-3/events","assignees_url":"https://api.github.com/repos/jangorecki/h2o-3/assignees{/user}","branches_url":"https://api.github.com/repos/jangorecki/h2o-3/branches{/branch}","tags_url":"https://api.github.com/repos/jangorecki/h2o-3/tags","blobs_url":"https://api.github.com/repos/jangorecki/h2o-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jangorecki/h2o-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jangorecki/h2o-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/jangorecki/h2o-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jangorecki/h2o-3/statuses/{sha}","languages_url":"https://api.github.com/repos/jangorecki/h2o-3/languages","stargazers_url":"https://api.github.com/repos/jangorecki/h2o-3/stargazers","contributors_url":"https://api.github.com/repos/jangorecki/h2o-3/contributors","subscribers_url":"https://api.github.com/repos/jangorecki/h2o-3/subscribers","subscription_url":"https://api.github.com/repos/jangorecki/h2o-3/subscription","commits_url":"https://api.github.com/repos/jangorecki/h2o-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/jangorecki/h2o-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/jangorecki/h2o-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/jangorecki/h2o-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/jangorecki/h2o-3/contents/{+path}","compare_url":"https://api.github.com/repos/jangorecki/h2o-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jangorecki/h2o-3/merges","archive_url":"https://api.github.com/repos/jangorecki/h2o-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jangorecki/h2o-3/downloads","issues_url":"https://api.github.com/repos/jangorecki/h2o-3/issues{/number}","pulls_url":"https://api.github.com/repos/jangorecki/h2o-3/pulls{/number}","milestones_url":"https://api.github.com/repos/jangorecki/h2o-3/milestones{/number}","notifications_url":"https://api.github.com/repos/jangorecki/h2o-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jangorecki/h2o-3/labels{/name}","releases_url":"https://api.github.com/repos/jangorecki/h2o-3/releases{/id}","deployments_url":"https://api.github.com/repos/jangorecki/h2o-3/deployments","created_at":"2016-06-10T22:29:35Z","updated_at":"2016-06-10T22:29:45Z","pushed_at":"2016-12-08T18:48:59Z","git_url":"git://github.com/jangorecki/h2o-3.git","ssh_url":"git@github.com:jangorecki/h2o-3.git","clone_url":"https://github.com/jangorecki/h2o-3.git","svn_url":"https://github.com/jangorecki/h2o-3","homepage":"http://h2o.ai","size":203743,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"h2oai:master","ref":"master","sha":"cedfca4e2a33e72776e474825f6a9596e4c6e2f9","user":{"login":"h2oai","id":1402695,"avatar_url":"https://avatars.githubusercontent.com/u/1402695?v=3","gravatar_id":"","url":"https://api.github.com/users/h2oai","html_url":"https://github.com/h2oai","followers_url":"https://api.github.com/users/h2oai/followers","following_url":"https://api.github.com/users/h2oai/following{/other_user}","gists_url":"https://api.github.com/users/h2oai/gists{/gist_id}","starred_url":"https://api.github.com/users/h2oai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2oai/subscriptions","organizations_url":"https://api.github.com/users/h2oai/orgs","repos_url":"https://api.github.com/users/h2oai/repos","events_url":"https://api.github.com/users/h2oai/events{/privacy}","received_events_url":"https://api.github.com/users/h2oai/received_events","type":"Organization","site_admin":false},"repo":{"id":17371412,"name":"h2o-3","full_name":"h2oai/h2o-3","owner":{"login":"h2oai","id":1402695,"avatar_url":"https://avatars.githubusercontent.com/u/1402695?v=3","gravatar_id":"","url":"https://api.github.com/users/h2oai","html_url":"https://github.com/h2oai","followers_url":"https://api.github.com/users/h2oai/followers","following_url":"https://api.github.com/users/h2oai/following{/other_user}","gists_url":"https://api.github.com/users/h2oai/gists{/gist_id}","starred_url":"https://api.github.com/users/h2oai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h2oai/subscriptions","organizations_url":"https://api.github.com/users/h2oai/orgs","repos_url":"https://api.github.com/users/h2oai/repos","events_url":"https://api.github.com/users/h2oai/events{/privacy}","received_events_url":"https://api.github.com/users/h2oai/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/h2oai/h2o-3","description":"Open Source Fast Scalable Machine Learning API For Smarter Applications (Deep Learning, Gradient Boosting, Random Forest, Generalized Linear Modeling (Logistic Regression, Elastic Net), K-Means, PCA...)","fork":false,"url":"https://api.github.com/repos/h2oai/h2o-3","forks_url":"https://api.github.com/repos/h2oai/h2o-3/forks","keys_url":"https://api.github.com/repos/h2oai/h2o-3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/h2oai/h2o-3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/h2oai/h2o-3/teams","hooks_url":"https://api.github.com/repos/h2oai/h2o-3/hooks","issue_events_url":"https://api.github.com/repos/h2oai/h2o-3/issues/events{/number}","events_url":"https://api.github.com/repos/h2oai/h2o-3/events","assignees_url":"https://api.github.com/repos/h2oai/h2o-3/assignees{/user}","branches_url":"https://api.github.com/repos/h2oai/h2o-3/branches{/branch}","tags_url":"https://api.github.com/repos/h2oai/h2o-3/tags","blobs_url":"https://api.github.com/repos/h2oai/h2o-3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/h2oai/h2o-3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/h2oai/h2o-3/git/refs{/sha}","trees_url":"https://api.github.com/repos/h2oai/h2o-3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/h2oai/h2o-3/statuses/{sha}","languages_url":"https://api.github.com/repos/h2oai/h2o-3/languages","stargazers_url":"https://api.github.com/repos/h2oai/h2o-3/stargazers","contributors_url":"https://api.github.com/repos/h2oai/h2o-3/contributors","subscribers_url":"https://api.github.com/repos/h2oai/h2o-3/subscribers","subscription_url":"https://api.github.com/repos/h2oai/h2o-3/subscription","commits_url":"https://api.github.com/repos/h2oai/h2o-3/commits{/sha}","git_commits_url":"https://api.github.com/repos/h2oai/h2o-3/git/commits{/sha}","comments_url":"https://api.github.com/repos/h2oai/h2o-3/comments{/number}","issue_comment_url":"https://api.github.com/repos/h2oai/h2o-3/issues/comments{/number}","contents_url":"https://api.github.com/repos/h2oai/h2o-3/contents/{+path}","compare_url":"https://api.github.com/repos/h2oai/h2o-3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/h2oai/h2o-3/merges","archive_url":"https://api.github.com/repos/h2oai/h2o-3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/h2oai/h2o-3/downloads","issues_url":"https://api.github.com/repos/h2oai/h2o-3/issues{/number}","pulls_url":"https://api.github.com/repos/h2oai/h2o-3/pulls{/number}","milestones_url":"https://api.github.com/repos/h2oai/h2o-3/milestones{/number}","notifications_url":"https://api.github.com/repos/h2oai/h2o-3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/h2oai/h2o-3/labels{/name}","releases_url":"https://api.github.com/repos/h2oai/h2o-3/releases{/id}","deployments_url":"https://api.github.com/repos/h2oai/h2o-3/deployments","created_at":"2014-03-03T16:08:07Z","updated_at":"2016-12-07T23:23:12Z","pushed_at":"2016-12-08T19:49:56Z","git_url":"git://github.com/h2oai/h2o-3.git","ssh_url":"git@github.com:h2oai/h2o-3.git","clone_url":"https://github.com/h2oai/h2o-3.git","svn_url":"https://github.com/h2oai/h2o-3","homepage":"http://h2o.ai","size":385981,"stargazers_count":1575,"watchers_count":1575,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":692,"mirror_url":null,"open_issues_count":33,"forks":692,"open_issues":33,"watchers":1575,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/454"},"html":{"href":"https://github.com/h2oai/h2o-3/pull/454"},"issue":{"href":"https://api.github.com/repos/h2oai/h2o-3/issues/454"},"comments":{"href":"https://api.github.com/repos/h2oai/h2o-3/issues/454/comments"},"review_comments":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/454/comments"},"review_comment":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/h2oai/h2o-3/pulls/454/commits"},"statuses":{"href":"https://api.github.com/repos/h2oai/h2o-3/statuses/ad863dde53030728e787e1359e44a29e722c39d0"}}}}
{"actor":{"display_login":"jangorecki"}}