Add NULL and NOT NULL modifiers for data types in create query

This commit is contained in:
potya 2020-05-20 04:26:19 +03:00
parent d8bb98bbcf
commit a21cc0e76e
2 changed files with 0 additions and 7 deletions

View File

@ -428,7 +428,6 @@ struct Settings : public SettingsCollection<Settings>
M(SettingUInt64, mark_cache_min_lifetime, 0, "Obsolete setting, does nothing. Will be removed after 2020-05-31", 0) \
M(SettingBool, partial_merge_join, false, "Obsolete. Use join_algorithm='prefer_partial_merge' instead.", 0) \
M(SettingUInt64, max_memory_usage_for_all_queries, 0, "Obsolete. Will be removed after 2020-10-20", 0) \
M(SettingBool, cast_keep_nullable, false, "Cast operator keep Nullable for new data type", 0) \
M(SettingBool, data_type_default_nullable, false, "Data types without NULL or NOT NULL will make Nullable", 0) \

View File

@ -41,7 +41,6 @@
#include <Functions/DateTimeTransforms.h>
#include <DataTypes/DataTypeLowCardinality.h>
#include <Columns/ColumnLowCardinality.h>
#include <Core/Settings.h>
namespace DB
@ -2407,11 +2406,6 @@ protected:
" Instead there is a column with the following structure: " + column->dumpStructure(),
ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
Settings set;
if (set.cast_keep_nullable)
if (arguments.back().type->isNullable()) {
return makeNullable(DataTypeFactory::instance().get(type_col->getValue<String>()));
}
return DataTypeFactory::instance().get(type_col->getValue<String>());
}