Fix error

This commit is contained in:
Alexey Milovidov 2024-03-10 02:51:32 +01:00
parent e30a1c9cbc
commit bbeecf4ed5

View File

@ -67,12 +67,15 @@ public:
static FunctionOverloadResolverPtr create(ContextPtr context, CastType cast_type, bool internal, std::optional<CastDiagnostic> diagnostic)
{
const auto & settings_ref = context->getSettingsRef();
if (internal)
{
return std::make_unique<CastOverloadResolverImpl>(context, cast_type, internal, diagnostic, false /*keep_nullable*/, DataTypeValidationSettings{});
}
else
{
const auto & settings_ref = context->getSettingsRef();
return std::make_unique<CastOverloadResolverImpl>(context, cast_type, internal, diagnostic, settings_ref.cast_keep_nullable, DataTypeValidationSettings(settings_ref));
}
}
protected: