ClickHouse/src/Interpreters/parseColumnsListForTableFunction.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.1 KiB
C++
Raw Normal View History

#pragma once
2019-08-01 01:53:38 +00:00
#include <string>
#include <Storages/ColumnsDescription.h>
#include <Core/Settings.h>
namespace DB
{
2019-08-01 01:53:38 +00:00
class Context;
struct DataTypeValidationSettings
{
DataTypeValidationSettings() = default;
explicit DataTypeValidationSettings(const Settings & settings)
: allow_suspicious_low_cardinality_types(settings.allow_suspicious_low_cardinality_types)
, allow_experimental_object_type(settings.allow_experimental_object_type)
, allow_suspicious_fixed_string_types(settings.allow_suspicious_fixed_string_types)
{
}
2022-12-21 23:47:56 +00:00
bool allow_suspicious_low_cardinality_types = true;
bool allow_experimental_object_type = true;
bool allow_suspicious_fixed_string_types = true;
};
void validateDataType(const DataTypePtr & type, const DataTypeValidationSettings & settings);
2019-07-31 15:58:28 +00:00
/// Parses a common argument for table functions such as table structure given in string
2023-03-13 04:21:48 +00:00
[[nodiscard]] ColumnsDescription parseColumnsListFromString(const std::string & structure, const ContextPtr & context);
bool tryParseColumnsListFromString(const std::string & structure, ColumnsDescription & columns, const ContextPtr & context, String & error);
}