mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
rm FormatSettings from tryConvertFieldToType for backport
This commit is contained in:
parent
aa953a7136
commit
78d140e4c9
@ -572,12 +572,12 @@ Field convertFieldToTypeImpl(const Field & src, const IDataType & type, const ID
|
||||
|
||||
}
|
||||
|
||||
Field tryConvertFieldToType(const Field & from_value, const IDataType & to_type, const IDataType * from_type_hint, const FormatSettings & format_settings)
|
||||
Field tryConvertFieldToType(const Field & from_value, const IDataType & to_type, const IDataType * from_type_hint)
|
||||
{
|
||||
/// TODO: implement proper tryConvertFieldToType without try/catch by adding template flag to convertFieldToTypeImpl to not throw an exception.
|
||||
try
|
||||
{
|
||||
return convertFieldToType(from_value, to_type, from_type_hint, format_settings);
|
||||
return convertFieldToType(from_value, to_type, from_type_hint);
|
||||
} catch (...)
|
||||
{
|
||||
return {};
|
||||
|
@ -18,7 +18,7 @@ class IDataType;
|
||||
Field convertFieldToType(const Field & from_value, const IDataType & to_type, const IDataType * from_type_hint = nullptr);
|
||||
|
||||
/// Same as convertFieldToType but returns empty Field in case of an exception.
|
||||
Field tryConvertFieldToType(const Field & from_value, const IDataType & to_type, const IDataType * from_type_hint = nullptr, const FormatSettings & format_settings = {});
|
||||
Field tryConvertFieldToType(const Field & from_value, const IDataType & to_type, const IDataType * from_type_hint = nullptr);
|
||||
|
||||
/// Does the same, but throws ARGUMENT_OUT_OF_BOUND if value does not fall into the range.
|
||||
Field convertFieldToTypeOrThrow(const Field & from_value, const IDataType & to_type, const IDataType * from_type_hint = nullptr);
|
||||
|
Loading…
Reference in New Issue
Block a user