From 001e113ca6fc37f1a1a9e88bbb2b1068e45a4adc Mon Sep 17 00:00:00 2001 From: millb Date: Fri, 8 Nov 2019 19:12:19 +0300 Subject: [PATCH] Working commit --- dbms/src/IO/ReadHelpers.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dbms/src/IO/ReadHelpers.h b/dbms/src/IO/ReadHelpers.h index 926f50a64ab..a863be66a74 100644 --- a/dbms/src/IO/ReadHelpers.h +++ b/dbms/src/IO/ReadHelpers.h @@ -253,12 +253,14 @@ inline void readBoolTextWord(bool & x, ReadBuffer & buf) template ReturnType readIntTextImpl(T & x, ReadBuffer & buf) { + std::cerr << "\n\nEnter in readIntTextImpl function\n\n"; static constexpr bool throw_exception = std::is_same_v; bool negative = false; std::make_unsigned_t res = 0; if (buf.eof()) { + std::cerr << "\n\nbuf.eof\n\n"; if constexpr (throw_exception) throwReadAfterEOF(); else @@ -267,6 +269,7 @@ ReturnType readIntTextImpl(T & x, ReadBuffer & buf) while (!buf.eof()) { + std::cerr << "\n\nDo\n\n"; switch (*buf.position()) { case '+': @@ -309,6 +312,7 @@ ReturnType readIntTextImpl(T & x, ReadBuffer & buf) template void readIntText(T & x, ReadBuffer & buf) { + std::cerr << "\n\nEnter in readIntText function\n\n"; readIntTextImpl(x, buf); } @@ -669,11 +673,11 @@ inline void readBinary(LocalDate & x, ReadBuffer & buf) { readPODBinary(x, buf); /// Generic methods to read value in text tab-separated format. template inline std::enable_if_t, void> -readText(T & x, ReadBuffer & buf) { readIntText(x, buf); } +readText(T & x, ReadBuffer & buf) { readIntText(x, buf); std::cerr << "\n\nEnter in readText for integral\n\n";} template inline std::enable_if_t, void> -readText(T & x, ReadBuffer & buf) { readFloatText(x, buf); } +readText(T & x, ReadBuffer & buf) { readFloatText(x, buf); std::cerr << "\n\nEnter in readText for float\n\n";} inline void readText(bool & x, ReadBuffer & buf) { readBoolText(x, buf); } inline void readText(String & x, ReadBuffer & buf) { readEscapedString(x, buf); }