Fix datetime schema inference in case of empty string

This commit is contained in:
avogar 2022-11-02 19:16:51 +00:00
parent c2749a8971
commit 774a86021f
3 changed files with 5 additions and 0 deletions

View File

@ -464,6 +464,9 @@ bool tryInferDate(const std::string_view & field)
bool tryInferDateTime(const std::string_view & field, const FormatSettings & settings)
{
if (field.empty())
return false;
ReadBufferFromString buf(field);
Float64 tmp_float;
/// Check if it's just a number, and if so, don't try to infer DateTime from it,

View File

@ -0,0 +1 @@
select * from format(CSV, '""');