ClickHouse/src/Core/SettingsEnums.h

192 lines
5.5 KiB
C++
Raw Normal View History

#pragma once
#include <Core/SettingsFields.h>
2021-10-15 20:18:20 +00:00
#include <QueryPipeline/SizeLimits.h>
#include <Formats/FormatSettings.h>
namespace DB
{
enum class LoadBalancing
{
/// among replicas with a minimum number of errors selected randomly
RANDOM = 0,
/// a replica is selected among the replicas with the minimum number of errors
/// with the minimum number of distinguished characters in the replica name and local hostname
NEAREST_HOSTNAME,
// replicas with the same number of errors are accessed in the same order
// as they are specified in the configuration.
IN_ORDER,
/// if first replica one has higher number of errors,
/// pick a random one from replicas with minimum number of errors
FIRST_OR_RANDOM,
// round robin across replicas with the same number of errors.
ROUND_ROBIN,
};
DECLARE_SETTING_ENUM(LoadBalancing)
enum class JoinStrictness
{
Unspecified = 0, /// Query JOIN without strictness will throw Exception.
ALL, /// Query JOIN without strictness -> ALL JOIN ...
ANY, /// Query JOIN without strictness -> ANY JOIN ...
};
DECLARE_SETTING_ENUM(JoinStrictness)
enum class JoinAlgorithm
{
AUTO = 0,
HASH,
PARTIAL_MERGE,
PREFER_PARTIAL_MERGE,
2022-04-20 11:47:16 +00:00
PARALLEL_HASH,
};
DECLARE_SETTING_ENUM(JoinAlgorithm)
/// Which rows should be included in TOTALS.
enum class TotalsMode
{
BEFORE_HAVING = 0, /// Count HAVING for all read rows;
/// including those not in max_rows_to_group_by
/// and have not passed HAVING after grouping.
AFTER_HAVING_INCLUSIVE = 1, /// Count on all rows except those that have not passed HAVING;
/// that is, to include in TOTALS all the rows that did not pass max_rows_to_group_by.
AFTER_HAVING_EXCLUSIVE = 2, /// Include only the rows that passed and max_rows_to_group_by, and HAVING.
AFTER_HAVING_AUTO = 3, /// Automatically select between INCLUSIVE and EXCLUSIVE,
};
DECLARE_SETTING_ENUM(TotalsMode)
/// The settings keeps OverflowMode which cannot be OverflowMode::ANY.
DECLARE_SETTING_ENUM(OverflowMode)
/// The settings keeps OverflowMode which can be OverflowMode::ANY.
DECLARE_SETTING_ENUM_WITH_RENAME(OverflowModeGroupBy, OverflowMode)
/// The setting for executing distributed subqueries inside IN or JOIN sections.
enum class DistributedProductMode
{
DENY = 0, /// Disable
LOCAL, /// Convert to local query
GLOBAL, /// Convert to global query
ALLOW /// Enable
};
DECLARE_SETTING_ENUM(DistributedProductMode)
DECLARE_SETTING_ENUM_WITH_RENAME(DateTimeInputFormat, FormatSettings::DateTimeInputFormat)
DECLARE_SETTING_ENUM_WITH_RENAME(DateTimeOutputFormat, FormatSettings::DateTimeOutputFormat)
enum class LogsLevel
{
none = 0, /// Disable
fatal,
error,
warning,
information,
debug,
trace,
2021-09-03 10:07:40 +00:00
test,
};
DECLARE_SETTING_ENUM(LogsLevel)
// Make it signed for compatibility with DataTypeEnum8
enum QueryLogElementType : int8_t
{
QUERY_START = 1,
QUERY_FINISH = 2,
EXCEPTION_BEFORE_START = 3,
EXCEPTION_WHILE_PROCESSING = 4,
};
DECLARE_SETTING_ENUM_WITH_RENAME(LogQueriesType, QueryLogElementType)
enum class DefaultDatabaseEngine
{
Ordinary,
Atomic,
};
DECLARE_SETTING_ENUM(DefaultDatabaseEngine)
2022-01-31 17:10:59 +00:00
enum class DefaultTableEngine
{
None = 0, /// Disable. Need to use ENGINE =
Log,
StripeLog,
MergeTree,
ReplacingMergeTree,
ReplicatedMergeTree,
ReplicatedReplacingMergeTree,
Memory,
};
DECLARE_SETTING_ENUM(DefaultTableEngine)
2020-10-24 13:41:20 +00:00
enum class MySQLDataTypesSupport
{
DECIMAL, // convert MySQL's decimal and number to ClickHouse Decimal when applicable
DATETIME64, // convert MySQL's DATETIME and TIMESTAMP and ClickHouse DateTime64 if precision is > 0 or range is greater that for DateTime.
DATE2DATE32, // convert MySQL's date type to ClickHouse Date32
DATE2STRING // convert MySQL's date type to ClickHouse String(This is usually used when your mysql date is less than 1925)
};
DECLARE_SETTING_MULTI_ENUM(MySQLDataTypesSupport)
enum class UnionMode
{
Unspecified = 0, // Query UNION without UnionMode will throw exception
ALL, // Query UNION without UnionMode -> SELECT ... UNION ALL SELECT ...
DISTINCT // Query UNION without UnionMode -> SELECT ... UNION DISTINCT SELECT ...
};
DECLARE_SETTING_ENUM(UnionMode)
enum class DistributedDDLOutputMode
{
NONE,
THROW,
NULL_STATUS_ON_TIMEOUT,
NEVER_THROW,
};
DECLARE_SETTING_ENUM(DistributedDDLOutputMode)
2021-03-18 05:26:32 +00:00
enum class HandleKafkaErrorMode
{
2022-04-07 18:32:47 +00:00
DEFAULT = 0, // Ignore errors with threshold.
2021-03-18 05:26:32 +00:00
STREAM, // Put errors to stream in the virtual column named ``_error.
/*FIXED_SYSTEM_TABLE, Put errors to in a fixed system table likey system.kafka_errors. This is not implemented now. */
/*CUSTOM_SYSTEM_TABLE, Put errors to in a custom system table. This is not implemented now. */
};
DECLARE_SETTING_ENUM(HandleKafkaErrorMode)
2021-08-16 11:30:56 +00:00
enum class ShortCircuitFunctionEvaluation
{
ENABLE, // Use short-circuit function evaluation for functions that are suitable for it.
FORCE_ENABLE, // Use short-circuit function evaluation for all functions.
DISABLE, // Disable short-circuit function evaluation.
};
DECLARE_SETTING_ENUM(ShortCircuitFunctionEvaluation)
DECLARE_SETTING_ENUM_WITH_RENAME(EnumComparingMode, FormatSettings::EnumComparingMode)
2021-11-09 13:14:07 +00:00
DECLARE_SETTING_ENUM_WITH_RENAME(EscapingRule, FormatSettings::EscapingRule)
2022-01-27 16:54:15 +00:00
DECLARE_SETTING_ENUM_WITH_RENAME(MsgPackUUIDRepresentation, FormatSettings::MsgPackUUIDRepresentation)
}