Commit Graph

1117 Commits

Author SHA1 Message Date
Robert Schulze
43945cea1b
Fixing some warnings 2022-05-16 20:59:27 +02:00
Anton Popov
e911900054 remove last mentions of data streams 2022-05-09 19:15:24 +00:00
Robert Schulze
330212e0f4
Remove inherited create() method + disallow copying
The original motivation for this commit was that shared_ptr_helper used
std::shared_ptr<>() which does two heap allocations instead of
make_shared<>() which does a single allocation. Turned out that
1. the affected code (--> Storages/) is not on a hot path (rendering the
performance argument moot ...)
2. yet copying Storage objects is potentially dangerous and was
   previously allowed.

Hence, this change

- removes shared_ptr_helper and as a result all inherited create() methods,

- instead, Storage objects are now created using make_shared<>() by the
  caller (for that to work, many constructors had to be made public), and

- all Storage classes were marked as noncopyable using boost::noncopyable.

In sum, we are (likely) not making things faster but the code becomes
cleaner and harder to misuse.
2022-05-02 08:46:52 +02:00
Alexey Milovidov
1ddb04b992
Merge pull request #36715 from amosbird/refactorbase
Reorganize source files so that base won't depend on Common
2022-04-30 09:40:58 +03:00
Amos Bird
4a5e4274f0
base should not depend on Common 2022-04-29 10:26:35 +08:00
Maksim Kita
c4d98aaa4c ClickHouseDictionarySource context copy 2022-04-28 14:16:49 +02:00
Maksim Kita
fa1579cdd5
Merge pull request #36390 from lthaooo/fix_dictionary_reload_bug
fix dictionary reload bug
2022-04-28 13:37:34 +02:00
alesapin
92296484e7
Merge pull request #36348 from rschu1ze/erase_if3
Replace remove-erase idiom by C++20 erase()/erase_if()
2022-04-25 23:34:18 +02:00
tavplubix
7f50bebba1
Merge pull request #36463 from ClickHouse/fix_36451
Ignore DNS errors when checking if dictionary source is local
2022-04-22 15:28:48 +03:00
Alexander Tokmakov
5d129e13ee ignore DNS errors when checking if dictionary source is local 2022-04-20 18:40:10 +02:00
Robert Schulze
b24ca8de52
Fix various clang-tidy warnings
When I tried to add cool new clang-tidy 14 warnings, I noticed that the
current clang-tidy settings already produce a ton of warnings. This
commit addresses many of these. Almost all of them were non-critical,
i.e. C vs. C++ style casts.
2022-04-20 10:29:05 +02:00
Robert Schulze
b6d7367538
Merge remote-tracking branch 'origin/master' into erase_if3
Conflicts:
- Interpreters/ActionsDAG.cpp
2022-04-20 10:02:59 +02:00
lthaooo
1b533aa583 fix dictionary reload bug 2022-04-18 21:13:08 +08:00
Alexey Milovidov
36595e4206
Merge pull request #36320 from ClickHouse/fix-clang-tidy-14
Fix clang-tidy-14 (part 1)
2022-04-18 07:02:10 +03:00
Alexey Milovidov
242919eddd Remove abbreviation 2022-04-18 01:02:49 +02:00
Robert Schulze
1e1df8e101
Replace remove-erase idiom by C++20 erase()/erase_if()
- makes the code less verbose while being as efficient
2022-04-17 12:04:47 +02:00
Alexey Milovidov
294efeccfe Fix clang-tidy-14 (part 1) 2022-04-16 04:54:04 +02:00
Julian Gilyadov
a4f56f3330
Throw exception when file cant be executed instead of displaying success 2022-04-12 17:52:44 +02:00
Antonio Andelic
9990abb76a Use compile-time check for Exception messages, fix wrong messages 2022-03-29 13:16:11 +00:00
Kseniia Sumarokova
4a464d18be
Update CassandraDictionarySource.cpp 2022-03-18 14:04:14 +01:00
Kseniia Sumarokova
5f0fdd64fe
Update src/Dictionaries/CassandraDictionarySource.cpp
Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
2022-03-18 10:41:39 +01:00
kssenii
a2cd165d38 Add remote host filter 2022-03-17 11:48:42 +01:00
Nikolai Kochetov
a380aa6b8a
Merge pull request #35294 from ClickHouse/reload-remote_url_allow_hosts
Reload remote_url_allow_hosts after config update.
2022-03-15 22:07:16 +01:00
Nikolai Kochetov
97aa6c82ce Reload remote_url_allow_hosts after config update. 2022-03-15 13:00:31 +00:00
Maksim Kita
1d674123a9 Fix clang-tidy warnings in Databases, DataTypes, Dictionaries folders 2022-03-14 18:17:35 +00:00
Alexey Milovidov
df906dfbd4 Change comments 2022-03-11 23:46:02 +01:00
1lann
5423c5a45c Fix typo of update_lag
In external dictionary providers, the allowed keys for configuration seemed to have a typo
of "update_lag" as "update_tag", preventing the use of "update_lag". This change fixes that.
2022-03-07 18:31:20 +08:00
Maksim Kita
b1a956c5f1 clang-tidy check performance-move-const-arg fix 2022-03-02 18:15:27 +00:00
Maksim Kita
1f5837359e clang-tidy check performance-noexcept-move-constructor fix 2022-03-02 18:15:27 +00:00
mreddy017
f893002b69 Fix vulnerable code related to std::move and noexcept
This commit fixes the vulnerable code related to std::move and noexcept identified by clangtidy tool.
2022-03-02 18:15:27 +00:00
Vitaly Baranov
aee67a6693
Merge pull request #31484 from eungenue/Implement-SSL-X509-certificate-authentication
Implement ssl x509 certificate authentication
2022-02-21 11:30:52 +03:00
Maksim Kita
13cbf79ecb Improve performance of insert into table functions URL, S3, File, HDFS 2022-02-10 20:06:23 +00:00
Anton Popov
298838f891 avoid unnecessary copying of Settings 2022-02-10 12:13:51 +03:00
Azat Khuzhin
bedf208cbd Use fmt::runtime() for LOG_* for non constexpr
Here is oneliner:

    $ gg 'LOG_\(DEBUG\|TRACE\|INFO\|TEST\|WARNING\|ERROR\|FATAL\)([^,]*, [a-zA-Z]' -- :*.cpp :*.h | cut -d: -f1 | sort -u | xargs -r sed -E -i 's#(LOG_[A-Z]*)\(([^,]*), ([A-Za-z][^,)]*)#\1(\2, fmt::runtime(\3)#'

Note, that I tried to do this with coccinelle (tool for semantic
patchin), but it cannot parse C++:

    $ cat fmt.cocci
    @@
    expression log;
    expression var;
    @@

    -LOG_DEBUG(log, var)
    +LOG_DEBUG(log, fmt::runtime(var))

I've also tried to use some macros/templates magic to do this implicitly
in logger_useful.h, but I failed to do so, and apparently it is not
possible for now.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

v2: manual fixes
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:03 +03:00
Maksim Kita
5ef83deaa6 Update sort to pdqsort 2022-01-30 19:49:48 +00:00
Maksim Kita
43604a2e8f Fixed tests 2022-01-25 21:56:29 +00:00
Maksim Kita
ca77f652e2 Fixed style check 2022-01-25 11:13:37 +00:00
Maksim Kita
e27332ce10 RangeHashedDictionary added options range_lookup_strategy, convert_null_range_bound_to_open 2022-01-25 11:13:37 +00:00
Maksim Kita
4e7e67e330 Fixed tests 2022-01-25 11:13:37 +00:00
Maksim Kita
c72f7f2147 RangeHashedDictionary added support for range values that extend Int64 type 2022-01-25 11:13:37 +00:00
Maksim Kita
bcbd956b83 RangeHashedDictionary change layout structure 2022-01-25 11:13:37 +00:00
Maksim Kita
f76536c079
Merge pull request #33914 from kitaisreal/dictionaries-added-support-for-date-time-64
Dictionaries added support for DateTime64
2022-01-23 13:21:22 +01:00
Maksim Kita
bceb2d598f Fixed style check 2022-01-22 20:34:42 +00:00
Maksim Kita
3e30641fc8 Dictionaries updated support for empty attributes 2022-01-22 20:01:45 +00:00
Maksim Kita
fd87d81108 Dictionaries added support for DateTime64 2022-01-22 18:03:45 +00:00
alexey-milovidov
2e7a1fe229
Merge pull request #33871 from kitaisreal/flat-dictionary-improve-data-load-performance
FlatDictionary improve data load performance
2022-01-22 13:07:05 +03:00
alexey-milovidov
eb6849f7c7
Merge pull request #33842 from azat/cmake-contrib-fixes
More cmake external modules cleanups
2022-01-22 10:34:54 +03:00
Maksim Kita
b130a2b1ed Fixed tests 2022-01-21 19:22:55 +00:00
Maksim Kita
2d712b1d26 FlatDictionary improve data load performance 2022-01-21 15:01:55 +00:00
Maksim Kita
548a7bccee
Merge pull request #33804 from CurtizJ/redis-pool
Use connection pool for redis dictionary
2022-01-21 11:40:35 +01:00