Skip to content
Snippets Groups Projects
Unverified Commit 723849a9 authored by Cam Saul's avatar Cam Saul Committed by GitHub
Browse files

Merge pull request #6967 from metabase/fix-druid-tests

Fix Druid tests :(
parents 2066bfd0 1b235b38
No related branches found
No related tags found
No related merge requests found
......@@ -519,14 +519,13 @@
both. Defaults to being `inclusive` (e.g. `<=` instead of `<`) but specify option `inclusive?` to change this."
[field & {:keys [lower upper inclusive?]
:or {inclusive? true}}]
(u/prog1 {:type :bound
:ordering :numeric
:dimension (->rvalue field)
:lower (num (->rvalue lower))
:upper (num (->rvalue upper))
:lowerStrict (not inclusive?)
:upperStrict (not inclusive?)}
(println "inclusive?" inclusive? (u/pprint-to-str 'blue <>))))
{:type :bound
:ordering :numeric
:dimension (->rvalue field)
:lower (num (->rvalue lower))
:upper (num (->rvalue upper))
:lowerStrict (not inclusive?)
:upperStrict (not inclusive?)})
(defn- check-filter-fields [filter-type & fields]
(doseq [field fields]
......@@ -576,10 +575,10 @@
:= (filter:= field value)
:!= (filter:not (filter:= field value))
:< (filter:bound field, :lower value, :inclusive? false)
:> (filter:bound field, :upper value, :inclusive? false)
:<= (filter:bound field, :lower value)
:>= (filter:bound field, :upper value)))
:< (filter:bound field, :upper value, :inclusive? false)
:> (filter:bound field, :lower value, :inclusive? false)
:<= (filter:bound field, :upper value)
:>= (filter:bound field, :lower value)))
(catch Throwable e
(log/warn (.getMessage e))))))
......@@ -588,7 +587,7 @@
(case compound-type
:and {:type :and, :fields (filterv identity (map parse-filter-clause:filter subclauses))}
:or {:type :or, :fields (filterv identity (map parse-filter-clause:filter subclauses))}
:not (when-let [subclause (parse-filter-subclause:filter subclause)]
:not (when-let [subclause (parse-filter-clause:filter subclause)]
(filter:not subclause))
nil (parse-filter-subclause:filter clause)))
......
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