Skip to content
Snippets Groups Projects
Commit 1971fb4d authored by Simon Belak's avatar Simon Belak
Browse files

Round :sd in tests [ci all]

parent 1aefe8f8
No related branches found
No related tags found
No related merge requests found
......@@ -298,11 +298,14 @@
;; Make sure we're able to fingerprint TIME fields (#5911)
(expect-with-engine :postgres
#{#metabase.models.field.FieldInstance{:name "start_time", :fingerprint {:global {:distinct-count 1}
#{#metabase.models.field.FieldInstance{:name "start_time", :fingerprint {:global {:distinct-count 1
:nil% 0.0}
:type {:type/DateTime {:earliest "1970-01-01T22:00:00.000Z", :latest "1970-01-01T22:00:00.000Z"}}}}
#metabase.models.field.FieldInstance{:name "end_time", :fingerprint {:global {:distinct-count 1}
#metabase.models.field.FieldInstance{:name "end_time", :fingerprint {:global {:distinct-count 1
:nil% 0.0}
:type {:type/DateTime {:earliest "1970-01-01T09:00:00.000Z", :latest "1970-01-01T09:00:00.000Z"}}}}
#metabase.models.field.FieldInstance{:name "reason", :fingerprint {:global {:distinct-count 1}
#metabase.models.field.FieldInstance{:name "reason", :fingerprint {:global {:distinct-count 1
:nil% 0.0}
:type {:type/Text {:percent-json 0.0
:percent-url 0.0
:percent-email 0.0
......
......@@ -236,7 +236,7 @@
users/user->id
user/permissions-set
atom)]
(let [dashboard (magic/automagic-analysis (Table (id :venues)) {})
(let [dashboard (magic/automagic-analysis (Table (id :venues)) {})
rastas-personal-collection (db/select-one-field :id 'Collection
:personal_owner_id api/*current-user-id*)]
(->> (save-transient-dashboard! dashboard rastas-personal-collection)
......
......@@ -418,7 +418,7 @@
"Rounds the numerical fields of a fingerprint to 2 decimal places"
[field]
(-> field
(update-in-if-present [:fingerprint :type :type/Number] round-fingerprint-fields 2 [:min :max :avg])
(update-in-if-present [:fingerprint :type :type/Number] round-fingerprint-fields 2 [:min :max :avg :sd])
;; quartal estimation is order dependent and the ordering is not stable across different DB engines, hence more aggressive trimming
(update-in-if-present [:fingerprint :type :type/Number] round-fingerprint-fields 0 [:q1 :q3])
(update-in-if-present [:fingerprint :type :type/Text] round-fingerprint-fields 2 [:percent-json :percent-url :percent-email :average-length])))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment