From 189c2845977a8b84420ec2b2ca9f98bfc66988f2 Mon Sep 17 00:00:00 2001 From: tao jiang Date: Thu, 20 Aug 2020 18:42:14 +0800 Subject: [PATCH] fix if statement code style check --- src/Processors/Formats/Impl/TabSeparatedRowInputFormat.cpp | 6 +++--- src/Processors/Formats/RowInputFormatWithDiagnosticInfo.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.cpp b/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.cpp index 8bc5c7498f4..20b96c40b5a 100644 --- a/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.cpp +++ b/src/Processors/Formats/Impl/TabSeparatedRowInputFormat.cpp @@ -332,12 +332,12 @@ void TabSeparatedRowInputFormat::tryDeserializeField(const DataTypePtr & type, I if (column_indexes_for_input_fields[file_column]) { // check null value for type is not nullable. don't cross buffer bound for simplicity, so maybe missing some case - if(!type->isNullable() && !in.eof()) + if (!type->isNullable() && !in.eof()) { - if(*in.position() == '\\' && in.available() >= 2) + if (*in.position() == '\\' && in.available() >= 2) { ++in.position(); - if(*in.position() == 'N') + if (*in.position() == 'N') { ++in.position(); throw Exception("unexpected Null value of not Nullable type", ErrorCodes::INCORRECT_DATA); diff --git a/src/Processors/Formats/RowInputFormatWithDiagnosticInfo.cpp b/src/Processors/Formats/RowInputFormatWithDiagnosticInfo.cpp index 124c7ab439a..957e5bb2c82 100644 --- a/src/Processors/Formats/RowInputFormatWithDiagnosticInfo.cpp +++ b/src/Processors/Formats/RowInputFormatWithDiagnosticInfo.cpp @@ -145,7 +145,7 @@ bool RowInputFormatWithDiagnosticInfo::deserializeFieldAndPrintDiagnosticInfo(co { std::rethrow_exception(exception); } - catch (DB::Exception e) + catch (const DB::Exception & e) { out << e.what(); }