{"action":"created","comment":{"url":"https://api.github.com/repos/metabase/metabase/pulls/comments/69350166","id":69350166,"diff_hunk":"@@ -1,37 +0,0 @@\n-(ns metabase.driver.crate.analyze\n-  (:require [korma.core :as k]\n-            [metabase.driver.generic-sql :as sql]\n-            [metabase.models.field :as field]\n-            [metabase.sync-database.analyze :as analyze]))\n-\n-(defn- field-avg-length [field]\n-  (or (some-> (sql/korma-entity (field/table field))\n-              (k/select (k/aggregate (avg (k/sqlfn :CHAR_LENGTH\n-                                                   (sql/escape-field-name (:name field))))\n-                                     :len))\n-              first\n-              :len\n-              int)\n-      0))\n-\n-(defn- field-percent-urls [field]\n-  (or (let [korma-table (sql/korma-entity (field/table field))]\n-        (when-let [total-non-null-count (:count (first (k/select korma-table\n-                                                         (k/aggregate (count (k/raw \"*\")) :count)\n-                                                         (k/where {(sql/escape-field-name (:name field)) [not= nil]}))))]\n-          (when (> total-non-null-count 0)\n-            (when-let [url-count (:count (first (k/select korma-table\n-                                                  (k/aggregate (count (k/raw \"*\")) :count)\n-                                                  (k/where {(sql/escape-field-name (:name field)) [like \"http%://_%.__%\"]}))))]\n-              (float (/ url-count total-non-null-count))))))\n-      0.0))\n-\n-(defn analyze-table\n-  \"Default implementation of `analyze-table` for SQL drivers.\"\n-  [driver table new-table-ids]\n-  ((analyze/make-analyze-table driver\n-                               :field-avg-length-fn   field-avg-length\n-                               :field-percent-urls-fn field-percent-urls)\n-    driver\n-    table\n-    new-table-ids))","path":"src/metabase/driver/crate/analyze.clj","position":37,"original_position":37,"commit_id":"e42622057bdd4d2b6d12dcf795de8e438a8ec3b7","original_commit_id":"e42622057bdd4d2b6d12dcf795de8e438a8ec3b7","user":{"login":"camsaul","id":1455846,"avatar_url":"https://avatars.githubusercontent.com/u/1455846?v=3","gravatar_id":"","url":"https://api.github.com/users/camsaul","html_url":"https://github.com/camsaul","followers_url":"https://api.github.com/users/camsaul/followers","following_url":"https://api.github.com/users/camsaul/following{/other_user}","gists_url":"https://api.github.com/users/camsaul/gists{/gist_id}","starred_url":"https://api.github.com/users/camsaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camsaul/subscriptions","organizations_url":"https://api.github.com/users/camsaul/orgs","repos_url":"https://api.github.com/users/camsaul/repos","events_url":"https://api.github.com/users/camsaul/events{/privacy}","received_events_url":"https://api.github.com/users/camsaul/received_events","type":"User","site_admin":false},"body":"it was basically just a cut-and-paste of the one in Generic SQL.","created_at":"2016-07-01T20:12:00Z","updated_at":"2016-07-01T20:12:00Z","html_url":"https://github.com/metabase/metabase/pull/2855#discussion_r69350166","pull_request_url":"https://api.github.com/repos/metabase/metabase/pulls/2855","_links":{"self":{"href":"https://api.github.com/repos/metabase/metabase/pulls/comments/69350166"},"html":{"href":"https://github.com/metabase/metabase/pull/2855#discussion_r69350166"},"pull_request":{"href":"https://api.github.com/repos/metabase/metabase/pulls/2855"}}},"pull_request":{"url":"https://api.github.com/repos/metabase/metabase/pulls/2855","id":75756233,"html_url":"https://github.com/metabase/metabase/pull/2855","diff_url":"https://github.com/metabase/metabase/pull/2855.diff","patch_url":"https://github.com/metabase/metabase/pull/2855.patch","issue_url":"https://api.github.com/repos/metabase/metabase/issues/2855","number":2855,"state":"open","locked":false,"title":"Finish Korma -> HoneySQL Transition :honey_pot:","user":{"login":"camsaul","id":1455846,"avatar_url":"https://avatars.githubusercontent.com/u/1455846?v=3","gravatar_id":"","url":"https://api.github.com/users/camsaul","html_url":"https://github.com/camsaul","followers_url":"https://api.github.com/users/camsaul/followers","following_url":"https://api.github.com/users/camsaul/following{/other_user}","gists_url":"https://api.github.com/users/camsaul/gists{/gist_id}","starred_url":"https://api.github.com/users/camsaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camsaul/subscriptions","organizations_url":"https://api.github.com/users/camsaul/orgs","repos_url":"https://api.github.com/users/camsaul/repos","events_url":"https://api.github.com/users/camsaul/events{/privacy}","received_events_url":"https://api.github.com/users/camsaul/received_events","type":"User","site_admin":false},"body":"Completely remove korma from the codebase.\r\n\r\nResolves #2643","created_at":"2016-06-30T03:47:02Z","updated_at":"2016-07-01T20:12:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"604e8b60efbfb04707d64cd9f522aa551f16e5fd","assignee":{"login":"camsaul","id":1455846,"avatar_url":"https://avatars.githubusercontent.com/u/1455846?v=3","gravatar_id":"","url":"https://api.github.com/users/camsaul","html_url":"https://github.com/camsaul","followers_url":"https://api.github.com/users/camsaul/followers","following_url":"https://api.github.com/users/camsaul/following{/other_user}","gists_url":"https://api.github.com/users/camsaul/gists{/gist_id}","starred_url":"https://api.github.com/users/camsaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camsaul/subscriptions","organizations_url":"https://api.github.com/users/camsaul/orgs","repos_url":"https://api.github.com/users/camsaul/repos","events_url":"https://api.github.com/users/camsaul/events{/privacy}","received_events_url":"https://api.github.com/users/camsaul/received_events","type":"User","site_admin":false},"assignees":[{"login":"camsaul","id":1455846,"avatar_url":"https://avatars.githubusercontent.com/u/1455846?v=3","gravatar_id":"","url":"https://api.github.com/users/camsaul","html_url":"https://github.com/camsaul","followers_url":"https://api.github.com/users/camsaul/followers","following_url":"https://api.github.com/users/camsaul/following{/other_user}","gists_url":"https://api.github.com/users/camsaul/gists{/gist_id}","starred_url":"https://api.github.com/users/camsaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camsaul/subscriptions","organizations_url":"https://api.github.com/users/camsaul/orgs","repos_url":"https://api.github.com/users/camsaul/repos","events_url":"https://api.github.com/users/camsaul/events{/privacy}","received_events_url":"https://api.github.com/users/camsaul/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/metabase/metabase/milestones/20","html_url":"https://github.com/metabase/metabase/milestones/0.19.0","labels_url":"https://api.github.com/repos/metabase/metabase/milestones/20/labels","id":1765730,"number":20,"title":"0.19.0","description":"Code Complete: July 12th\r\nExpected Release date July 19th","creator":{"login":"salsakran","id":107439,"avatar_url":"https://avatars.githubusercontent.com/u/107439?v=3","gravatar_id":"","url":"https://api.github.com/users/salsakran","html_url":"https://github.com/salsakran","followers_url":"https://api.github.com/users/salsakran/followers","following_url":"https://api.github.com/users/salsakran/following{/other_user}","gists_url":"https://api.github.com/users/salsakran/gists{/gist_id}","starred_url":"https://api.github.com/users/salsakran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salsakran/subscriptions","organizations_url":"https://api.github.com/users/salsakran/orgs","repos_url":"https://api.github.com/users/salsakran/repos","events_url":"https://api.github.com/users/salsakran/events{/privacy}","received_events_url":"https://api.github.com/users/salsakran/received_events","type":"User","site_admin":false},"open_issues":41,"closed_issues":8,"state":"open","created_at":"2016-05-13T22:21:31Z","updated_at":"2016-07-01T18:48:15Z","due_on":"2016-07-12T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/metabase/metabase/pulls/2855/commits","review_comments_url":"https://api.github.com/repos/metabase/metabase/pulls/2855/comments","review_comment_url":"https://api.github.com/repos/metabase/metabase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metabase/metabase/issues/2855/comments","statuses_url":"https://api.github.com/repos/metabase/metabase/statuses/e42622057bdd4d2b6d12dcf795de8e438a8ec3b7","head":{"label":"metabase:switch-to-honeysql-part-9","ref":"switch-to-honeysql-part-9","sha":"e42622057bdd4d2b6d12dcf795de8e438a8ec3b7","user":{"login":"metabase","id":10520629,"avatar_url":"https://avatars.githubusercontent.com/u/10520629?v=3","gravatar_id":"","url":"https://api.github.com/users/metabase","html_url":"https://github.com/metabase","followers_url":"https://api.github.com/users/metabase/followers","following_url":"https://api.github.com/users/metabase/following{/other_user}","gists_url":"https://api.github.com/users/metabase/gists{/gist_id}","starred_url":"https://api.github.com/users/metabase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabase/subscriptions","organizations_url":"https://api.github.com/users/metabase/orgs","repos_url":"https://api.github.com/users/metabase/repos","events_url":"https://api.github.com/users/metabase/events{/privacy}","received_events_url":"https://api.github.com/users/metabase/received_events","type":"Organization","site_admin":false},"repo":{"id":30203935,"name":"metabase","full_name":"metabase/metabase","owner":{"login":"metabase","id":10520629,"avatar_url":"https://avatars.githubusercontent.com/u/10520629?v=3","gravatar_id":"","url":"https://api.github.com/users/metabase","html_url":"https://github.com/metabase","followers_url":"https://api.github.com/users/metabase/followers","following_url":"https://api.github.com/users/metabase/following{/other_user}","gists_url":"https://api.github.com/users/metabase/gists{/gist_id}","starred_url":"https://api.github.com/users/metabase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabase/subscriptions","organizations_url":"https://api.github.com/users/metabase/orgs","repos_url":"https://api.github.com/users/metabase/repos","events_url":"https://api.github.com/users/metabase/events{/privacy}","received_events_url":"https://api.github.com/users/metabase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metabase/metabase","description":"The simplest, fastest way to get business intelligence and analytics  to everyone in your company :yum:","fork":false,"url":"https://api.github.com/repos/metabase/metabase","forks_url":"https://api.github.com/repos/metabase/metabase/forks","keys_url":"https://api.github.com/repos/metabase/metabase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metabase/metabase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metabase/metabase/teams","hooks_url":"https://api.github.com/repos/metabase/metabase/hooks","issue_events_url":"https://api.github.com/repos/metabase/metabase/issues/events{/number}","events_url":"https://api.github.com/repos/metabase/metabase/events","assignees_url":"https://api.github.com/repos/metabase/metabase/assignees{/user}","branches_url":"https://api.github.com/repos/metabase/metabase/branches{/branch}","tags_url":"https://api.github.com/repos/metabase/metabase/tags","blobs_url":"https://api.github.com/repos/metabase/metabase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metabase/metabase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metabase/metabase/git/refs{/sha}","trees_url":"https://api.github.com/repos/metabase/metabase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metabase/metabase/statuses/{sha}","languages_url":"https://api.github.com/repos/metabase/metabase/languages","stargazers_url":"https://api.github.com/repos/metabase/metabase/stargazers","contributors_url":"https://api.github.com/repos/metabase/metabase/contributors","subscribers_url":"https://api.github.com/repos/metabase/metabase/subscribers","subscription_url":"https://api.github.com/repos/metabase/metabase/subscription","commits_url":"https://api.github.com/repos/metabase/metabase/commits{/sha}","git_commits_url":"https://api.github.com/repos/metabase/metabase/git/commits{/sha}","comments_url":"https://api.github.com/repos/metabase/metabase/comments{/number}","issue_comment_url":"https://api.github.com/repos/metabase/metabase/issues/comments{/number}","contents_url":"https://api.github.com/repos/metabase/metabase/contents/{+path}","compare_url":"https://api.github.com/repos/metabase/metabase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metabase/metabase/merges","archive_url":"https://api.github.com/repos/metabase/metabase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metabase/metabase/downloads","issues_url":"https://api.github.com/repos/metabase/metabase/issues{/number}","pulls_url":"https://api.github.com/repos/metabase/metabase/pulls{/number}","milestones_url":"https://api.github.com/repos/metabase/metabase/milestones{/number}","notifications_url":"https://api.github.com/repos/metabase/metabase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metabase/metabase/labels{/name}","releases_url":"https://api.github.com/repos/metabase/metabase/releases{/id}","deployments_url":"https://api.github.com/repos/metabase/metabase/deployments","created_at":"2015-02-02T19:25:47Z","updated_at":"2016-07-01T18:31:33Z","pushed_at":"2016-07-01T19:27:00Z","git_url":"git://github.com/metabase/metabase.git","ssh_url":"git@github.com:metabase/metabase.git","clone_url":"https://github.com/metabase/metabase.git","svn_url":"https://github.com/metabase/metabase","homepage":"http://metabase.com","size":39717,"stargazers_count":2957,"watchers_count":2957,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":191,"mirror_url":null,"open_issues_count":408,"forks":191,"open_issues":408,"watchers":2957,"default_branch":"master"}},"base":{"label":"metabase:master","ref":"master","sha":"ed7fd55fd5ed5eb5bb049aa967cd26dcde3f2c26","user":{"login":"metabase","id":10520629,"avatar_url":"https://avatars.githubusercontent.com/u/10520629?v=3","gravatar_id":"","url":"https://api.github.com/users/metabase","html_url":"https://github.com/metabase","followers_url":"https://api.github.com/users/metabase/followers","following_url":"https://api.github.com/users/metabase/following{/other_user}","gists_url":"https://api.github.com/users/metabase/gists{/gist_id}","starred_url":"https://api.github.com/users/metabase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabase/subscriptions","organizations_url":"https://api.github.com/users/metabase/orgs","repos_url":"https://api.github.com/users/metabase/repos","events_url":"https://api.github.com/users/metabase/events{/privacy}","received_events_url":"https://api.github.com/users/metabase/received_events","type":"Organization","site_admin":false},"repo":{"id":30203935,"name":"metabase","full_name":"metabase/metabase","owner":{"login":"metabase","id":10520629,"avatar_url":"https://avatars.githubusercontent.com/u/10520629?v=3","gravatar_id":"","url":"https://api.github.com/users/metabase","html_url":"https://github.com/metabase","followers_url":"https://api.github.com/users/metabase/followers","following_url":"https://api.github.com/users/metabase/following{/other_user}","gists_url":"https://api.github.com/users/metabase/gists{/gist_id}","starred_url":"https://api.github.com/users/metabase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metabase/subscriptions","organizations_url":"https://api.github.com/users/metabase/orgs","repos_url":"https://api.github.com/users/metabase/repos","events_url":"https://api.github.com/users/metabase/events{/privacy}","received_events_url":"https://api.github.com/users/metabase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metabase/metabase","description":"The simplest, fastest way to get business intelligence and analytics  to everyone in your company :yum:","fork":false,"url":"https://api.github.com/repos/metabase/metabase","forks_url":"https://api.github.com/repos/metabase/metabase/forks","keys_url":"https://api.github.com/repos/metabase/metabase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metabase/metabase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metabase/metabase/teams","hooks_url":"https://api.github.com/repos/metabase/metabase/hooks","issue_events_url":"https://api.github.com/repos/metabase/metabase/issues/events{/number}","events_url":"https://api.github.com/repos/metabase/metabase/events","assignees_url":"https://api.github.com/repos/metabase/metabase/assignees{/user}","branches_url":"https://api.github.com/repos/metabase/metabase/branches{/branch}","tags_url":"https://api.github.com/repos/metabase/metabase/tags","blobs_url":"https://api.github.com/repos/metabase/metabase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metabase/metabase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metabase/metabase/git/refs{/sha}","trees_url":"https://api.github.com/repos/metabase/metabase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metabase/metabase/statuses/{sha}","languages_url":"https://api.github.com/repos/metabase/metabase/languages","stargazers_url":"https://api.github.com/repos/metabase/metabase/stargazers","contributors_url":"https://api.github.com/repos/metabase/metabase/contributors","subscribers_url":"https://api.github.com/repos/metabase/metabase/subscribers","subscription_url":"https://api.github.com/repos/metabase/metabase/subscription","commits_url":"https://api.github.com/repos/metabase/metabase/commits{/sha}","git_commits_url":"https://api.github.com/repos/metabase/metabase/git/commits{/sha}","comments_url":"https://api.github.com/repos/metabase/metabase/comments{/number}","issue_comment_url":"https://api.github.com/repos/metabase/metabase/issues/comments{/number}","contents_url":"https://api.github.com/repos/metabase/metabase/contents/{+path}","compare_url":"https://api.github.com/repos/metabase/metabase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metabase/metabase/merges","archive_url":"https://api.github.com/repos/metabase/metabase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metabase/metabase/downloads","issues_url":"https://api.github.com/repos/metabase/metabase/issues{/number}","pulls_url":"https://api.github.com/repos/metabase/metabase/pulls{/number}","milestones_url":"https://api.github.com/repos/metabase/metabase/milestones{/number}","notifications_url":"https://api.github.com/repos/metabase/metabase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metabase/metabase/labels{/name}","releases_url":"https://api.github.com/repos/metabase/metabase/releases{/id}","deployments_url":"https://api.github.com/repos/metabase/metabase/deployments","created_at":"2015-02-02T19:25:47Z","updated_at":"2016-07-01T18:31:33Z","pushed_at":"2016-07-01T19:27:00Z","git_url":"git://github.com/metabase/metabase.git","ssh_url":"git@github.com:metabase/metabase.git","clone_url":"https://github.com/metabase/metabase.git","svn_url":"https://github.com/metabase/metabase","homepage":"http://metabase.com","size":39717,"stargazers_count":2957,"watchers_count":2957,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":191,"mirror_url":null,"open_issues_count":408,"forks":191,"open_issues":408,"watchers":2957,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metabase/metabase/pulls/2855"},"html":{"href":"https://github.com/metabase/metabase/pull/2855"},"issue":{"href":"https://api.github.com/repos/metabase/metabase/issues/2855"},"comments":{"href":"https://api.github.com/repos/metabase/metabase/issues/2855/comments"},"review_comments":{"href":"https://api.github.com/repos/metabase/metabase/pulls/2855/comments"},"review_comment":{"href":"https://api.github.com/repos/metabase/metabase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metabase/metabase/pulls/2855/commits"},"statuses":{"href":"https://api.github.com/repos/metabase/metabase/statuses/e42622057bdd4d2b6d12dcf795de8e438a8ec3b7"}}}}
{"actor":{"display_login":"camsaul"}}