diff --git a/dbms/src/Storages/System/CMakeLists.txt b/dbms/src/Storages/System/CMakeLists.txt index f445a3e1e29..b4783ffa315 100644 --- a/dbms/src/Storages/System/CMakeLists.txt +++ b/dbms/src/Storages/System/CMakeLists.txt @@ -1,8 +1,6 @@ # The file StorageSystemContributors.cpp is generated at release time and committed to the source tree. # You can also regenerate it manually this way: -#if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/StorageSystemContributors.generated.cpp) -# execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/StorageSystemContributors.sh) -#endif() +# execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/StorageSystemContributors.sh) set (CONFIG_BUILD ${CMAKE_CURRENT_BINARY_DIR}/StorageSystemBuildOptions.generated.cpp) get_property (BUILD_COMPILE_DEFINITIONS DIRECTORY ${ClickHouse_SOURCE_DIR} PROPERTY COMPILE_DEFINITIONS) diff --git a/dbms/src/Storages/System/StorageSystemContributors.cpp b/dbms/src/Storages/System/StorageSystemContributors.cpp index 99c720e0f97..6e165a4ee40 100644 --- a/dbms/src/Storages/System/StorageSystemContributors.cpp +++ b/dbms/src/Storages/System/StorageSystemContributors.cpp @@ -1,10 +1,8 @@ -#if __has_include("StorageSystemContributors.generated.cpp") - #include "StorageSystemContributors.h" #include -#include #include +#include #include @@ -32,5 +30,3 @@ void StorageSystemContributors::fillData(MutableColumns & res_columns, const Con res_columns[0]->insert(String(it)); } } - -#endif diff --git a/dbms/src/Storages/System/StorageSystemContributors.generated.cpp b/dbms/src/Storages/System/StorageSystemContributors.generated.cpp index a92e0ccfafb..135fb357ff5 100644 --- a/dbms/src/Storages/System/StorageSystemContributors.generated.cpp +++ b/dbms/src/Storages/System/StorageSystemContributors.generated.cpp @@ -1,262 +1,263 @@ // autogenerated by ./StorageSystemContributors.sh const char * auto_contributors[] { -"Alberto", -"Aleksandra (Ася)", -"Alex Bocharov", -"Alex Krash", -"Alex Zatelepin", -"Alexander Avdonkin", -"Alexander Krasheninnikov", -"Alexander Lukin", -"Alexander Makarov", -"Alexander Marshalov", -"Alexander Millin", -"Alexander Prudaev", -"Alexander Sapin", -"Alexandr Krasheninnikov", -"Alexandr Orlov", -"Alexei Averchenko", -"Alexey Arno", -"Alexey Milovidov", -"Alexey Tronov", -"Alexey Vasiliev", -"Alexey Zatelepin", -"Alexsey Shestakov", -"Aliaksandr Pliutau", -"Amos Bird", -"Amy Krishnevsky", -"Anastasiya Tsarkova", -"AndreevDm", -"Andrew Grigorev", -"Andrey", -"Andrey Dudin", -"Andrey M", -"Andrey Mironov", -"Andrey Urusov", -"Anton Popov", -"Anton Tihonov", -"Anton Tikhonov", -"Arsen Hakobyan", -"Artem Andreenko", -"Artem Zuikov", -"Artemeey", -"Artemkin Pavel", -"Arthur Tokarchuk", -"Atri Sharma", -"Babacar Diassé", -"BayoNet", -"BlahGeek", -"Bogdan", -"Bogdan Voronin", -"Bolinov", -"Brett Hoerner", -"Bulat Gaifullin", -"Chen Yufei", -"Ciprian Hacman", -"Constantin S. Pan", -"CurtizJ", -"Daniel Bershatsky", -"Denis Burlaka", -"Denis Zhuravlev", -"Derek Perkins", -"Dmitry Bilunov", -"Dmitry Galuza", -"Dmitry Luhtionov", -"Dmitry Moskowski", -"Dmitry S..ky / skype: dvska-at-skype", -"Eugene Klimov", -"Eugene Konkov", -"Evgeniy Gatov", -"Evgeniy Udodov", -"Evgeny Konkov", -"Flowyi", -"Fruit of Eden", -"George", -"George3d6", -"Guillaume Tassery", -"Hamoon", -"Hiroaki Nakamura", -"Igor", -"Igor Hatarist", -"Igor Strykhar", -"Ilya", -"Ilya Breev", -"Ilya Khomutov", -"Ilya Korolev", -"Ilya Shipitsin", -"Ivan Babrou", -"Ivan Blinkov", -"Ivan He", -"Ivan Zhukov", -"Jason", -"Jean Baptiste Favre", -"Jonatas Freitas", -"Keiji Yoshida", -"Kirill Malev", -"Kirill Shvakov", -"KochetovNicolai", -"Konstantin Grabar", -"Konstantin Lebedev", -"Konstantin Podshumok", -"Leonardo Cecchi", -"Lev Borodin", -"Liu Cong", -"LiuCong", -"LiuYangkuan", -"Luis Bosque", -"Maks Skorokhod", -"Maksim", -"Marek Vavrusa", -"Marek Vavruša", -"Marek Vavruša", -"Marsel Arduanov", -"Max Akhmedov", -"Max Vetrov", -"Maxim Fridental", -"Maxim Khrisanfov", -"Maxim Nikulin", -"MaximAL", -"Michael Furmur", -"Michael Kolupaev", -"Michael Razuvaev", -"Mikhail Filimonov", -"Mikhail Salosin", -"Mikhail Surin", -"Mikhail f. Shiryaev", -"Milad Arabi", -"Narek Galstyan", -"Nicolae Vartolomei", -"Nikita Vasilev", -"Nikolai Kochetov", -"Nikolay Kirsh", -"Nikolay Vasiliev", -"Nikolay Volosatov", -"Okada Haruki", -"Oleg Komarov", -"Oleg Obleukhov", -"Olga Khvostikova", -"Orivej Desh", -"Pavel", -"Pavel Kartaviy", -"Pavel Kartavyy", -"Pavel Litvinenko", -"Pavel Patrin", -"Pavel Yakunin", -"Pawel Rog", -"Ravengg", -"Reto Kromer", -"Roman Lipovsky", -"Roman Nozdrin", -"Roman Peshkurov", -"Roman Tsisyk", -"SaltTan", -"Sergei Tsetlin (rekub)", -"Sergey Elantsev", -"Sergey Fedorov", -"Sergey Lazarev", -"Sergey Magidovich", -"Sergey V. Galtsev", -"Sergey Zaikin", -"Silviu Caragea", -"Simon Podlipsky", -"Sjoerd Mulder", -"Snow", -"Stanislav Pavlovichev", -"Stas Pavlovichev", -"SuperBot", -"Tangaev", -"The-Alchemist", -"Tobias Adamson", -"Tsarkova Anastasia", -"Vadim", -"Vadim Plakhtinskiy", -"Vadim Skipin", -"VadimPE", -"Valera Ryaboshapko", -"Vasily Nemkov", -"Vasily Okunev", -"Veloman Yunkan", -"Veniamin Gvozdikov", -"Victor Tarnavsky", -"Vitaliy Lyudvichenko", -"Vitaly Samigullin", -"Vlad Arkhipov", -"Vladimir Chebotarev", -"Vladimir Kolobaev", -"Vladimir Kozbin", -"Vladimir Smirnov", -"Vladislav Rassokhin", -"Vojtech Splichal", -"Vsevolod Orlov", -"Vyacheslav Alipov", -"William Shallum", -"Winter Zhang", -"Yegor Andreenko", -"Yuri Dyachenko", -"Yurii Vlasenko", -"Yury Karpovich", -"Yury Stankevich", -"abyss7", -"alesapin", -"alexey-milovidov", -"ap11", -"aprudaev", -"artpaul", -"avsharapov", -"blazerer", -"bseng", -"cekc", -"champtar", -"chenxing-xc", -"chenxing.xc", -"chertus", -"daoready", -"decaseal", -"egatov", -"elBroom", -"ezhaka", -"f1yegor", -"felixoid", -"filimonov", -"flow", -"glockbender", -"hotid", -"igor", -"ivanzhukov", -"javi", -"javi santana", -"kmeaw", -"ks1322", -"kshvakov", -"leozhang", -"liuyimin", -"lomberts", -"mfridental", -"morty", -"ns-vasilev", -"orantius", -"peshkurov", -"proller", -"pyos", -"robot-clickhouse", -"robot-metrika-test", -"root", -"santaux", -"serebrserg", -"shedx", -"stavrolia", -"sundy-li", -"sundyli", -"topvisor", -"velom", -"zamulla", -"zhang2014", -"Георгий Кондратьев", -"Дмитрий Канатников", -"Иванов Евгений", -"Павел Литвиненко", -"Смитюх Вячеслав", -"Сундуков Алексей", -"张健", -"谢磊", -nullptr }; + "Alberto", + "Aleksandra (Ася)", + "Alex Bocharov", + "Alex Krash", + "Alex Zatelepin", + "Alexander Avdonkin", + "Alexander Krasheninnikov", + "Alexander Lukin", + "Alexander Makarov", + "Alexander Marshalov", + "Alexander Millin", + "Alexander Prudaev", + "Alexander Sapin", + "Alexandr Krasheninnikov", + "Alexandr Orlov", + "Alexei Averchenko", + "Alexey Arno", + "Alexey Milovidov", + "Alexey Tronov", + "Alexey Vasiliev", + "Alexey Zatelepin", + "Alexsey Shestakov", + "Aliaksandr Pliutau", + "Amos Bird", + "Amy Krishnevsky", + "Anastasiya Tsarkova", + "AndreevDm", + "Andrew Grigorev", + "Andrey", + "Andrey Dudin", + "Andrey M", + "Andrey Mironov", + "Andrey Urusov", + "Anton Popov", + "Anton Tihonov", + "Anton Tikhonov", + "Arsen Hakobyan", + "Artem Andreenko", + "Artem Zuikov", + "Artemeey", + "Artemkin Pavel", + "Arthur Tokarchuk", + "Atri Sharma", + "Babacar Diassé", + "BayoNet", + "BlahGeek", + "Bogdan", + "Bogdan Voronin", + "Bolinov", + "Brett Hoerner", + "Bulat Gaifullin", + "Chen Yufei", + "Ciprian Hacman", + "Constantin S. Pan", + "CurtizJ", + "Daniel Bershatsky", + "Denis Burlaka", + "Denis Zhuravlev", + "Derek Perkins", + "Dmitry Bilunov", + "Dmitry Galuza", + "Dmitry Luhtionov", + "Dmitry Moskowski", + "Dmitry S..ky / skype: dvska-at-skype", + "Eugene Klimov", + "Eugene Konkov", + "Evgeniy Gatov", + "Evgeniy Udodov", + "Evgeny Konkov", + "Flowyi", + "Fruit of Eden", + "George", + "George3d6", + "Guillaume Tassery", + "Hamoon", + "Hiroaki Nakamura", + "Igor", + "Igor Hatarist", + "Igor Strykhar", + "Ilya", + "Ilya Breev", + "Ilya Khomutov", + "Ilya Korolev", + "Ilya Shipitsin", + "Ivan Babrou", + "Ivan Blinkov", + "Ivan He", + "Ivan Zhukov", + "Jason", + "Jean Baptiste Favre", + "Jonatas Freitas", + "Keiji Yoshida", + "Kirill Malev", + "Kirill Shvakov", + "KochetovNicolai", + "Konstantin Grabar", + "Konstantin Lebedev", + "Konstantin Podshumok", + "Leonardo Cecchi", + "Lev Borodin", + "Liu Cong", + "LiuCong", + "LiuYangkuan", + "Luis Bosque", + "Maks Skorokhod", + "Maksim", + "Marek Vavrusa", + "Marek Vavruša", + "Marek Vavruša", + "Marsel Arduanov", + "Max Akhmedov", + "Max Vetrov", + "Maxim Fridental", + "Maxim Khrisanfov", + "Maxim Nikulin", + "MaximAL", + "Michael Furmur", + "Michael Kolupaev", + "Michael Razuvaev", + "Mikhail Filimonov", + "Mikhail Salosin", + "Mikhail Surin", + "Mikhail f. Shiryaev", + "Milad Arabi", + "Narek Galstyan", + "Nicolae Vartolomei", + "Nikita Vasilev", + "Nikolai Kochetov", + "Nikolay Kirsh", + "Nikolay Vasiliev", + "Nikolay Volosatov", + "Okada Haruki", + "Oleg Komarov", + "Oleg Obleukhov", + "Olga Khvostikova", + "Orivej Desh", + "Pavel", + "Pavel Kartaviy", + "Pavel Kartavyy", + "Pavel Litvinenko", + "Pavel Patrin", + "Pavel Yakunin", + "Pawel Rog", + "Ravengg", + "Reto Kromer", + "Roman Lipovsky", + "Roman Nozdrin", + "Roman Peshkurov", + "Roman Tsisyk", + "SaltTan", + "Sergei Tsetlin (rekub)", + "Sergey Elantsev", + "Sergey Fedorov", + "Sergey Lazarev", + "Sergey Magidovich", + "Sergey V. Galtsev", + "Sergey Zaikin", + "Silviu Caragea", + "Simon Podlipsky", + "Sjoerd Mulder", + "Snow", + "Stanislav Pavlovichev", + "Stas Pavlovichev", + "SuperBot", + "Tangaev", + "The-Alchemist", + "Tobias Adamson", + "Tsarkova Anastasia", + "Vadim", + "Vadim Plakhtinskiy", + "Vadim Skipin", + "VadimPE", + "Valera Ryaboshapko", + "Vasily Nemkov", + "Vasily Okunev", + "Veloman Yunkan", + "Veniamin Gvozdikov", + "Victor Tarnavsky", + "Vitaliy Lyudvichenko", + "Vitaly Samigullin", + "Vlad Arkhipov", + "Vladimir Chebotarev", + "Vladimir Kolobaev", + "Vladimir Kozbin", + "Vladimir Smirnov", + "Vladislav Rassokhin", + "Vojtech Splichal", + "Vsevolod Orlov", + "Vyacheslav Alipov", + "William Shallum", + "Winter Zhang", + "Yegor Andreenko", + "Yuri Dyachenko", + "Yurii Vlasenko", + "Yury Karpovich", + "Yury Stankevich", + "abyss7", + "alesapin", + "alexey-milovidov", + "ap11", + "aprudaev", + "artpaul", + "avsharapov", + "blazerer", + "bseng", + "cekc", + "champtar", + "chenxing-xc", + "chenxing.xc", + "chertus", + "daoready", + "decaseal", + "egatov", + "elBroom", + "ezhaka", + "f1yegor", + "felixoid", + "filimonov", + "flow", + "ggerogery", + "glockbender", + "hotid", + "igor", + "ivanzhukov", + "javi", + "javi santana", + "kmeaw", + "ks1322", + "kshvakov", + "leozhang", + "liuyimin", + "lomberts", + "mfridental", + "morty", + "ns-vasilev", + "orantius", + "peshkurov", + "proller", + "pyos", + "robot-clickhouse", + "robot-metrika-test", + "root", + "santaux", + "serebrserg", + "shedx", + "stavrolia", + "sundy-li", + "sundyli", + "topvisor", + "velom", + "zamulla", + "zhang2014", + "Георгий Кондратьев", + "Дмитрий Канатников", + "Иванов Евгений", + "Павел Литвиненко", + "Смитюх Вячеслав", + "Сундуков Алексей", + "张健", + "谢磊", + nullptr}; diff --git a/dbms/src/Storages/System/StorageSystemContributors.h b/dbms/src/Storages/System/StorageSystemContributors.h index b62895d5788..4e2a47960f3 100644 --- a/dbms/src/Storages/System/StorageSystemContributors.h +++ b/dbms/src/Storages/System/StorageSystemContributors.h @@ -1,7 +1,5 @@ #pragma once -#if __has_include("StorageSystemContributors.generated.cpp") - #include #include @@ -30,5 +28,3 @@ public: static NamesAndTypesList getNamesAndTypes(); }; } - -#endif diff --git a/dbms/src/Storages/System/StorageSystemContributors.sh b/dbms/src/Storages/System/StorageSystemContributors.sh index 58895d1b781..93f97d19027 100755 --- a/dbms/src/Storages/System/StorageSystemContributors.sh +++ b/dbms/src/Storages/System/StorageSystemContributors.sh @@ -6,7 +6,7 @@ CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) CONTRIBUTORS_FILE=${CONTRIBUTORS_FILE=$CUR_DIR/StorageSystemContributors.generated.cpp} -git shortlog --summary | perl -lnE 's/^\s+\d+\s+(.+)/"$1",/; next unless $1; say $_' > $CONTRIBUTORS_FILE.tmp +git shortlog --summary | perl -lnE 's/^\s+\d+\s+(.+)/ "$1",/; next unless $1; say $_' > $CONTRIBUTORS_FILE.tmp # If git history not available - dont make target file if [ ! -s $CONTRIBUTORS_FILE.tmp ]; then @@ -18,7 +18,7 @@ fi echo "// autogenerated by $0" > $CONTRIBUTORS_FILE echo "const char * auto_contributors[] {" >> $CONTRIBUTORS_FILE cat $CONTRIBUTORS_FILE.tmp >> $CONTRIBUTORS_FILE -echo "nullptr };" >> $CONTRIBUTORS_FILE +echo -e " nullptr};" >> $CONTRIBUTORS_FILE echo "Collected `cat $CONTRIBUTORS_FILE.tmp | wc -l` contributors." rm $CONTRIBUTORS_FILE.tmp diff --git a/dbms/src/Storages/System/attachSystemTables.cpp b/dbms/src/Storages/System/attachSystemTables.cpp index facaa6c4fd3..34e03032ff1 100644 --- a/dbms/src/Storages/System/attachSystemTables.cpp +++ b/dbms/src/Storages/System/attachSystemTables.cpp @@ -32,9 +32,7 @@ #include #include #include -#if __has_include("StorageSystemContributors.generated.cpp") -# include -#endif +#include namespace DB @@ -59,9 +57,7 @@ void attachSystemTablesLocal(IDatabase & system_database) system_database.attachTable("data_type_families", StorageSystemDataTypeFamilies::create("data_type_families")); system_database.attachTable("collations", StorageSystemCollations::create("collations")); system_database.attachTable("table_engines", StorageSystemTableEngines::create("table_engines")); -#if __has_include("StorageSystemContributors.generated.cpp") system_database.attachTable("contributors", StorageSystemContributors::create("contributors")); -#endif } void attachSystemTablesServer(IDatabase & system_database, bool has_zookeeper) diff --git a/dbms/tests/queries/0_stateless/00747_contributors.sql b/dbms/tests/queries/0_stateless/00747_contributors.sql index ec75d877841..d32cd367e1e 100644 --- a/dbms/tests/queries/0_stateless/00747_contributors.sql +++ b/dbms/tests/queries/0_stateless/00747_contributors.sql @@ -1,2 +1 @@ --- Normally table should contain 250+ contributors. But when fast git clone used (--depth=X) (Travis build) table will contain only <=X contributors -SELECT if ((SELECT count(*) FROM system.contributors) > 1, 'ok', 'fail'); +SELECT if ((SELECT count(*) FROM system.contributors) > 200, 'ok', 'fail');