未验证 提交 c13ab94f 编写于 作者: A alexey-milovidov 提交者: GitHub

Merge pull request #16344 from ClickHouse/exclamation-marks

Remove excessive exclamation marks
......@@ -92,7 +92,7 @@ struct AggregateFunctionTimeSeriesGroupSumData
it_ss->second.add(t, v);
}
if (result.size() > 0 && t < result.back().first)
throw Exception{"timeSeriesGroupSum or timeSeriesGroupRateSum must order by timestamp asc!!!", ErrorCodes::LOGICAL_ERROR};
throw Exception{"timeSeriesGroupSum or timeSeriesGroupRateSum must order by timestamp asc.", ErrorCodes::LOGICAL_ERROR};
if (result.size() > 0 && t == result.back().first)
{
//do not add new point
......
......@@ -5,9 +5,6 @@ target_include_directories (string_pool SYSTEM BEFORE PRIVATE ${SPARSEHASH_INCLU
add_executable (field field.cpp)
target_link_libraries (field PRIVATE dbms)
add_executable (move_field move_field.cpp)
target_link_libraries (move_field PRIVATE clickhouse_common_io)
add_executable (string_ref_hash string_ref_hash.cpp)
target_link_libraries (string_ref_hash PRIVATE clickhouse_common_io)
......
#include <gtest/gtest.h>
#include <Core/Field.h>
using namespace DB;
GTEST_TEST(Field, Move)
{
Field f;
f = Field{String{"Hello, world (1)"}};
ASSERT_EQ(f.get<String>(), "Hello, world (1)");
f = Field{String{"Hello, world (2)"}};
ASSERT_EQ(f.get<String>(), "Hello, world (2)");
f = Field{Array{Field{String{"Hello, world (3)"}}}};
ASSERT_EQ(f.get<Array>()[0].get<String>(), "Hello, world (3)");
f = String{"Hello, world (4)"};
ASSERT_EQ(f.get<String>(), "Hello, world (4)");
f = Array{Field{String{"Hello, world (5)"}}};
ASSERT_EQ(f.get<Array>()[0].get<String>(), "Hello, world (5)");
f = Array{String{"Hello, world (6)"}};
ASSERT_EQ(f.get<Array>()[0].get<String>(), "Hello, world (6)");
}
#include <iostream>
#include <Core/Field.h>
int main(int, char **)
{
using namespace DB;
Field f;
f = Field{String{"Hello, world"}};
std::cerr << f.get<String>() << "\n";
f = Field{String{"Hello, world!"}};
std::cerr << f.get<String>() << "\n";
f = Field{Array{Field{String{"Hello, world!!"}}}};
std::cerr << f.get<Array>()[0].get<String>() << "\n";
f = String{"Hello, world!!!"};
std::cerr << f.get<String>() << "\n";
f = Array{Field{String{"Hello, world!!!!"}}};
std::cerr << f.get<Array>()[0].get<String>() << "\n";
f = Array{String{"Hello, world!!!!!"}};
std::cerr << f.get<Array>()[0].get<String>() << "\n";
return 0;
}
......@@ -128,7 +128,7 @@ int main(int argc, char ** argv)
std::cerr << "sum_counts: " << sum_counts << ", elems: " << elems << std::endl;
if (sum_counts != n)
std::cerr << "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl;
std::cerr << "Error!" << std::endl;
}
return 0;
......
......@@ -99,3 +99,6 @@ find $ROOT_PATH/{src,base,programs,utils,tests,docs,website,cmake} '(' -name '*.
find $ROOT_PATH/{src,base,programs,utils,tests,docs,website,cmake} -name '*.md' -or -name '*.cpp' -or -name '*.h' | xargs grep -l -F $'\xEF\xBB\xBF' && echo "Files should not have UTF-8 BOM"
find $ROOT_PATH/{src,base,programs,utils,tests,docs,website,cmake} -name '*.md' -or -name '*.cpp' -or -name '*.h' | xargs grep -l -F $'\xFF\xFE' && echo "Files should not have UTF-16LE BOM"
find $ROOT_PATH/{src,base,programs,utils,tests,docs,website,cmake} -name '*.md' -or -name '*.cpp' -or -name '*.h' | xargs grep -l -F $'\xFE\xFF' && echo "Files should not have UTF-16BE BOM"
# Too many exclamation marks
find $ROOT_PATH/{src,base,programs,utils} -name '*.h' -or -name '*.cpp' | xargs grep -F '!!!' && echo "Too many exclamation marks (looks dirty, unconfident)."
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册