From 1dae33753cbced4b649661dc6b5085ad3947ad52 Mon Sep 17 00:00:00 2001 From: Vasily Nemkov Date: Mon, 11 Nov 2019 11:42:41 +0300 Subject: [PATCH] Fixed compilation error on Apple Clang --- dbms/src/IO/parseDateTimeBestEffort.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dbms/src/IO/parseDateTimeBestEffort.cpp b/dbms/src/IO/parseDateTimeBestEffort.cpp index 29137cc63de..e18f5fb82b5 100644 --- a/dbms/src/IO/parseDateTimeBestEffort.cpp +++ b/dbms/src/IO/parseDateTimeBestEffort.cpp @@ -552,13 +552,13 @@ void parseDateTime64BestEffort(DateTime64 & res, UInt32 scale, ReadBuffer & in, bool tryParseDateTime64BestEffort(DateTime64 & res, UInt32 scale, ReadBuffer & in, const DateLUTImpl & local_time_zone, const DateLUTImpl & utc_time_zone) { - DateTime64::NativeType whole; + time_t whole; DateTime64::NativeType fractional; - const auto result = parseDateTimeBestEffortImpl(whole, in, local_time_zone, utc_time_zone, &fractional); + if (!parseDateTimeBestEffortImpl(whole, in, local_time_zone, utc_time_zone, &fractional)) + return false; res = decimalFromComponents(whole, fractional, scale); - - return result; + return true; } }