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

We don't need to check for empty names any more

parent 611e7216
No related branches found
No related tags found
No related merge requests found
......@@ -71,24 +71,16 @@
(redux/post-complete
(redux/juxt
(apply f/col-wise (for [metadata result-metadata]
(if (and (seq (:name metadata))
(nil? (:fingerprint metadata)))
(f/fingerprinter metadata)
(f/constant-fingerprinter (:fingerprint metadata)))))
(if-not (:fingerprint metadata)
(f/constant-fingerprinter (:fingerprint metadata))
(f/fingerprinter metadata))))
(insights/insights result-metadata))
(fn [[fingerprints insights]]
;; Rarely certain queries will return columns with no names. For example
;; `SELECT COUNT(*)` in SQL Server seems to come back with no name. Since we
;; can't use those as field literals in subsequent queries just filter them out
{:metadata (->> (map (fn [fingerprint metadata]
(cond
(instance? Throwable fingerprint)
metadata
(not-empty (:name metadata))
(assoc metadata :fingerprint fingerprint)))
fingerprints
result-metadata)
(remove nil?))
{:metadata (map (fn [fingerprint metadata]
(if (instance? Throwable fingerprint)
metadata
(assoc metadata :fingerprint fingerprint)))
fingerprints
result-metadata)
:insights insights}))
(:rows results))))
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