Skip to content
Snippets Groups Projects
Commit a4421cae authored by Cam Saül's avatar Cam Saül
Browse files

Move druid-topN-results constant to somewhere more sensible [ci drivers]

parent 4daca535
Branches
Tags
No related merge requests found
......@@ -11,6 +11,13 @@
[metabase.util :as u])
(:import [metabase.query_processor.interface AgFieldRef DateTimeField DateTimeValue Expression Field RelativeDateTimeValue Value]))
(def ^:private ^:const topN-max-results
"Maximum number of rows the topN query in Druid should return. Huge values cause significant issues with the engine.
Coming from the default value hardcoded in the Druid engine itself
http://druid.io/docs/latest/querying/topnquery.html"
1000)
;; +-----> ::select +----> :groupBy
;; ::query ----| |
;; +----> ::ag-query ----+----> ::topN
......@@ -77,7 +84,7 @@
::total (merge defaults {:queryType :timeseries})
::grouped-timeseries (merge defaults {:queryType :timeseries})
::topN (merge defaults {:queryType :topN
:threshold i/druid-topN-max-results})
:threshold topN-max-results})
::groupBy (merge defaults {:queryType :groupBy})}))
......
......@@ -18,13 +18,6 @@
https://support.office.com/en-nz/article/Excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3"
1048576)
(def ^:const druid-topN-max-results
"Maximum number of rows the topN query in Druid should return. Huge values cause significant issues with the engine.
Coming from the default value hardcoded in the Druid engine itself
http://druid.io/docs/latest/querying/topnquery.html"
1000)
;;; # ------------------------------------------------------------ DYNAMIC VARS ------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment