summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/ce_mode_parameter.h
diff options
context:
space:
mode:
authorSvilen Mihaylov <svilen.mihaylov@mongodb.com>2022-07-08 07:59:17 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-08 08:49:53 +0000
commit568fa8a001eb42e07214acf33fab48e9ad31ca98 (patch)
tree1916a4c007d5f5598584d7fd11e98583bdac54a4 /src/mongo/db/query/ce_mode_parameter.h
parentce0ac09cdb8f38148cffc5860e142e5073f66472 (diff)
downloadmongo-568fa8a001eb42e07214acf33fab48e9ad31ca98.tar.gz
SERVER-66957 Integrate CE prototype
Diffstat (limited to 'src/mongo/db/query/ce_mode_parameter.h')
-rw-r--r--src/mongo/db/query/ce_mode_parameter.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/mongo/db/query/ce_mode_parameter.h b/src/mongo/db/query/ce_mode_parameter.h
new file mode 100644
index 00000000000..b267067747f
--- /dev/null
+++ b/src/mongo/db/query/ce_mode_parameter.h
@@ -0,0 +1,47 @@
+/**
+ * Copyright (C) 2022-present MongoDB, Inc.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the Server Side Public License, version 1,
+ * as published by MongoDB, Inc.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Server Side Public License for more details.
+ *
+ * You should have received a copy of the Server Side Public License
+ * along with this program. If not, see
+ * <http://www.mongodb.com/licensing/server-side-public-license>.
+ *
+ * As a special exception, the copyright holders give permission to link the
+ * code of portions of this program with the OpenSSL library under certain
+ * conditions as described in each individual source file and distribute
+ * linked combinations including the program with the OpenSSL library. You
+ * must comply with the Server Side Public License in all respects for
+ * all of the code used other than as permitted herein. If you modify file(s)
+ * with this exception, you may extend this exception to your version of the
+ * file(s), but you are not obligated to do so. If you do not wish to do so,
+ * delete this exception statement from your version. If you delete this
+ * exception statement from all source files in the program, then also delete
+ * it in the license file.
+ */
+
+#pragma once
+
+#include <string>
+
+#include "mongo/base/status.h"
+
+namespace mongo::ce {
+
+/**
+ * Defines cardinality estimation modes.
+ */
+const std::string kHeuristic = "heuristic";
+const std::string kHistogram = "histogram";
+const std::string kSampling = "sampling";
+
+Status validateCEMode(const std::string& value);
+
+} // namespace mongo::ce