Commit Graph

100378 Commits

Author SHA1 Message Date
Julio Jimenez
440cc51a7e
Fix Missing Env Vars - Sonar Nightly
Signed-off-by: Julio Jimenez <julio@clickhouse.com>
2022-10-31 14:11:52 -04:00
Alexey Milovidov
6e2cf7e6d8
Merge pull request #42796 from ClickHouse/update-cctz-3
Update CCTZ to 2022f
2022-10-31 17:50:49 +01:00
Alexey Milovidov
3ae414b807
Merge pull request #42831 from ClickHouse/sonar-missing-double-quote
Fix Missing Quotes - Sonar Nightly
2022-10-31 17:49:55 +01:00
Alexey Milovidov
f809142462 Add exclusions from the Snyk scan 2022-10-31 17:47:02 +01:00
Maksim Kita
f099bf63b3
Merge pull request #42809 from Gabriel39/comment_typo
Fix typo in comments
2022-10-31 18:30:32 +03:00
Anton Popov
2ae3cfa9e0
Merge branch 'master' into dynamic-columns-14 2022-10-31 16:15:19 +01:00
Julio Jimenez
9fb6f52286
Fix Missing Quotes - Sonar Nightly
Signed-off-by: Julio Jimenez <julio@clickhouse.com>
2022-10-31 11:02:08 -04:00
Alexander Tokmakov
226931229b
Merge pull request #42805 from ClickHouse/fix_some_races_in_merge_tree
Fix some races in MergeTree
2022-10-31 17:53:20 +03:00
Alexander Gololobov
3742fd848a Tests for upperUTF8() and for 32 and 64 byte boundaries 2022-10-31 15:31:14 +01:00
Márcio Martins
399d024c2c Fix array index argument type check for JSONExtract* functions 2022-10-31 15:08:34 +01:00
Márcio Martins
c33bd7794f
Merge branch 'master' into coercing-json-extract 2022-10-31 15:04:48 +01:00
Gabriel
22cf4b9457
Merge branch 'master' into comment_typo 2022-10-31 21:53:16 +08:00
Alexander Tokmakov
599ccb9939
Update MergeTreeData.h 2022-10-31 16:18:17 +03:00
Alexander Tokmakov
b2b9479afa
Update src/Storages/MergeTree/MergeTreeData.h
Co-authored-by: Sergei Trifonov <sergei@clickhouse.com>
2022-10-31 16:15:35 +03:00
Nikolay Degterinsky
81a812c1ea
Merge pull request #42822 from ClickHouse/serxa-patch-3
Link to proper place in docs
2022-10-31 13:11:15 +01:00
Nikolay Degterinsky
f3fd158895
Merge pull request #42821 from ClickHouse/serxa-patch-2
Fix link in docs
2022-10-31 13:04:15 +01:00
Denny Crane
1c9fd1d0c7 test for #36677 2022-10-31 12:01:04 +00:00
Denny Crane
89a155d95c test for #28083 2022-10-31 12:00:49 +00:00
Sergei Trifonov
e43ecf9ca0
Link to proper place in docs 2022-10-31 12:52:31 +01:00
Sergei Trifonov
b677e68c4e
Update column.md 2022-10-31 12:46:14 +01:00
Sergei Trifonov
9066e0c3da
Merge pull request #42760 from ClickHouse/serxa-patch-2
Fix anchor links
2022-10-31 12:38:48 +01:00
Maksim Kita
bca22ec5f5 Fixed code review issues 2022-10-31 12:30:00 +01:00
Nikolay Degterinsky
d8d479a8c0
Merge pull request #42804 from evillique/fix-create-user-parser
Fix a bug in ParserCreateUserQuery
2022-10-31 12:29:06 +01:00
Sergei Trifonov
8c67257a1c
Merge pull request #42665 from ClickHouse/token-bucket-throttler
Replace throttler algorithm by token bucket
2022-10-31 12:28:18 +01:00
Azat Khuzhin
c93262170d Remove ReadOnlyMetadataStorage
Throw exceptions from IMetadataStorage instead to avoid introducing
extra abstractions.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:30 +01:00
Azat Khuzhin
51bd0c2ac1 Make ReadOnlyMetadataStorage really readonly
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:26 +01:00
Azat Khuzhin
bceca73f6f Throw NOT_IMPLEMENTED form ReadOnlyMetadataStorage::getLastChanged()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:26 +01:00
Azat Khuzhin
3b7abbbff4 Rename s/listPrefix/findAllFiles, s/listPrefixInPath/getDirectoryContents/
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:26 +01:00
Azat Khuzhin
8345c5f881 tests: cover ATTACH of BACKUP from s3_plain disk
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:26 +01:00
Azat Khuzhin
fa7535c90d Slightly optimize MetadataStorageFromPlainObjectStorage::isDirectory()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:26 +01:00
Azat Khuzhin
82ea67eb51 Slightly better MetadataStorageFromPlainObjectStorage::isFile()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:26 +01:00
Azat Khuzhin
95fb2ad3cf Implement ATTACH of MergeTree table for s3_plain disk
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:26 +01:00
Azat Khuzhin
4e42521f44 Introduce ReadOnlyMetadataStorage
And use it for:
- MetadataStorageFromPlainObjectStorage
- MetadataStorageFromStaticFilesWebServer

This will allow to reduce ~100-200 lines of duplicated code, and plus
make the code less error prone.

Note, for now I tried to make this without behaviour changes.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:26 +01:00
Azat Khuzhin
f8ba24f040 Implement S3ObjectStorage::listPrefixInPath()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:26 +01:00
Azat Khuzhin
18e4fdf40f Introduce IObjectStorage::listPrefixInPath()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:25 +01:00
Azat Khuzhin
ee18140c48 Remove listPrefix() implementation for disks that does not support send_metadata
The reason for removing is it because not compatible with restoring
(with send_metadata set) anyway:
- HDFS - is not compatible with send_metadata, and besides it's
  implementaion is not correct, since it is simply `ls -l`, while the
  following is required: `find . -maxdepth 1 -type f`
- Web - is not compatible with send_metadata anyway
- Local - is not compatible with send_metadata anyway

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:25 +01:00
Azat Khuzhin
88db8ae7fa Add a comment for IObjectStorage::listPrefix()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:25 +01:00
Azat Khuzhin
94d9600fb8 Implement MetadataStorageFromPlainObjectStorage::getLastChanged() (as for web)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:25 +01:00
Azat Khuzhin
b34ffda272 Implement MetadataStorageFromPlainObjectStorage::getLastModified() (used by MergeTree)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:25 +01:00
Azat Khuzhin
f6d0c03ee5 Fix path to files in MetadataStorageFromPlainObjectStorage
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 12:02:25 +01:00
Maksim Kita
d760c78754 Fixed code review issues 2022-10-31 11:45:12 +01:00
Nikolai Kochetov
742d9af397
Merge pull request #42582 from azat/memory-tracker/fixes
Fix frequent memory drift message and clarify things in comments
2022-10-31 11:43:20 +01:00
Maksim Kita
115fcaffc5 Fixed tests 2022-10-31 11:30:56 +01:00
Azat Khuzhin
b62170426a Fix compilation of LLVM with cmake cache
Simple reproducer:

    $ cmake
    $ ninja contrib/llvm-project/llvm/lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/MasmParser.cpp.o # will have -std=c++14
    $ touch CMakeLists.txt
    $ cmake
    $ ninja contrib/llvm-project/llvm/lib/MC/MCParser/CMakeFiles/LLVMMCParser.dir/MasmParser.cpp.o # will have -std=c++20 and fail
    (fails because std::vector cannot work with opaque types anymore)

Fixes: #42249 (cc @rschu1ze)
2022-10-31 10:56:05 +01:00
Azat Khuzhin
5fe44f2736 Fix lowerUTF8()/upperUTF8() in case of symbol was in between 16-byte boundary
In lowerUTF8()/upperUTF8() there is an SSE optimization that handles
16 byte at a time, but only for ASCII, for UTF8 symbols converion will
be done by symbol.

Consider the following example:

    КВ АМ И СЖ
             ^ - offset is 15, length of sequence is 2
                 so first byte of a symbol is in first 16 bytes
                 second byte of a symbol is not ther

And in this case it will be handled incorrectly because it will try to
process oly these 16 bytes w/o looking forward.

This had been broken by #41286, before this patch it does not looks at
the row boundaries but only at the string end and so this sutation
wasn't possible.

Fixes: #42756
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 08:17:38 +01:00
Azat Khuzhin
32febf5155 Remove dead code in LowerUpperUTF8Impl::array()
AFAICS it was there before since it was possible to overrun the
expected_end, since utf8.convert() was called with "src_end - src" not
"expected_end - src".

Refs: 5a21f3908b054a0efc90c65a12fbe151c74d90dc:dbms/include/DB/Functions/FunctionsString.h
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-31 08:00:29 +01:00
Gabriel
94866979c5
Merge branch 'master' into comment_typo 2022-10-31 13:29:53 +08:00
Gabriel
620caeb07c Fix typo in comments 2022-10-31 13:20:58 +08:00
Nikolay Degterinsky
05e178b6d3
Merge pull request #42767 from azat/disks/web-sigsegv-fix
Fix possible SIGSEGV for web disks when file does not exists
2022-10-30 20:27:21 +01:00
Robert Schulze
088bc8b8b5
Merge pull request #42737 from arenadata/ADQM-605
Add support of Date32 arguments for formatDateTime and FROM_UNIXTIME functions
2022-10-30 20:07:46 +01:00