Commit Graph

115133 Commits

Author SHA1 Message Date
Diego Nieto
7dcaa0a25c
Merge branch 'master' into master 2023-05-12 11:46:37 +02:00
Diego Nieto (lesandie)
8fc0083a26 Rewrite following conversation/comments 2023-05-12 11:45:38 +02:00
Robert Schulze
2b980c9a19
Merge pull request #49822 from rschu1ze/rapidly-approaching
README.md: 4 --> 5
2023-05-12 11:42:40 +02:00
Robert Schulze
4d1b113d36
README.md: 4 --> 5 2023-05-12 09:41:13 +00:00
Han Fei
07341a04fd
Merge pull request #49666 from hanfei1991/hanfei/regexp-dict-read
Support `dictionary` table function for `RegExpTreeDictionary`
2023-05-12 11:40:46 +02:00
Nikita Mikhaylov
66badcd59c
Merge pull request #49725 from vitlibar/incremental-backup-append-table-def
Fix writing appended files to incremental backups
2023-05-12 11:37:49 +02:00
Robert Schulze
922420420c
Merge pull request #49300 from ClickHouse/rs/functdocs
Introduce more fields for in-source function documentation
2023-05-12 11:36:04 +02:00
Vitaly Baranov
eb62030fa4 Fix assigning a setting to NULL in settings profile's definition. 2023-05-12 11:04:30 +02:00
Azat Khuzhin
fa2074e67b Use CLOCK_MONOTONIC_RAW over CLOCK_MONOTONIC on Linux (fixes non monotonic clock)
There is no bug in Linux, the issue that CLOCK_MONOTONIC returns values
less then previous calls likely happens due to adjtime(3) (NTP), since
CLOCK_MONOTONIC is affected by it, and I've seen lots of slight time
modifications due to NTP on the servers. And even on my desktop (I also
have NTP enabled):

    CLOCK_MONOTONIC:     189292.803 (2 days +  4h 34m 52s)
    CLOCK_MONOTONIC_RAW: 189290.016 (2 days +  4h 34m 50s)

However on Linux there is CLOCK_MONOTONIC_RAW, it is similar to
CLOCK_MONOTONIC, but does not affected by the adjtime(3).

About performance, it is the same:

    CLOCK_MONOTONIC 10e6:     real=0m0.191s user=0m0.190s sys=0m0.000s
    CLOCK_MONOTONIC_RAW 10e6: real=0m0.191s user=0m0.191s sys=0m0.000s

Ops/s:
- AMD Threadripper: 52.3e6
- Xeon Silver 4216 2.10: 46.5e6

Fixes: c5d631ca54
Fixes: #29811 (cc @tavplubix)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-12 10:59:53 +02:00
Robert Schulze
d15f19912f
Merge pull request #49198 from ClibMouse/s390x_reinterpretas_fix
Fix reinterpretAs*() on big endian machines
2023-05-12 10:33:50 +02:00
Diego Nieto
4b69a203ea
Merge branch 'ClickHouse:master' into master 2023-05-12 10:07:18 +02:00
Azat Khuzhin
9c42f7f113 Fix settings aliases in native protocol
The initial test (tests/queries/0_stateless/02539_settings_alias.sh)
works only because of the clickhouse-client, while in native protocol
aliases does not work.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-12 05:56:32 +02:00
Azat Khuzhin
2c40dd6a4c Switch Block::NameMap to google::dense_hash_map over HashMap
Since HashMap creates 2^8 elements by default, while dense_hash_map
should be good here.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-12 05:52:57 +02:00
Alexey Milovidov
5bb1db0fa8 Allow loading dicrionaries and functions from YAML by default 2023-05-12 05:19:01 +02:00
DanRoscigno
11f78fed2b fix markdown spaces 2023-05-11 21:40:47 -04:00
DanRoscigno
a14ad025ee add greatest and least docs 2023-05-11 21:33:36 -04:00
Alexey Milovidov
fc993f4c07
Merge pull request #49809 from ClickHouse/alexey-milovidov-patch-7
Update build-cross-riscv.md
2023-05-12 03:19:01 +03:00
Alexey Milovidov
cf2b158072
Update build-cross-riscv.md 2023-05-12 03:18:43 +03:00
Dmitry Novik
0c0ea7bfc0 Analyzer: apply _CAST to constants only once 2023-05-11 23:07:48 +00:00
robot-clickhouse
6f19a374f2
Merge pull request #49791 from den-crane/patch-65
Update settings.md
2023-05-12 01:02:58 +02:00
Alexey Milovidov
76f7f5750d
Merge pull request #49799 from rschu1ze/demange
Typo: demange.cpp --> demangle.cpp
2023-05-12 02:01:49 +03:00
robot-ch-test-poll2
91fd3a3d16
Merge pull request #49745 from jrdi/improve-local-cache-documentation
Improve local cache documentation
2023-05-12 00:30:19 +02:00
Vitaly Baranov
c4036b8361
Merge pull request #49381 from ClickHouse/user-grants-from-config
Specify grants for users in `users.xml`
2023-05-12 00:15:52 +02:00
Kseniia Sumarokova
f5b959624d
Merge pull request #49733 from ClickHouse/nickitat-patch-11
Do not allocate own buffer in CachedOnDiskReadBufferFromFile when `use_external_buffer == true`
2023-05-12 00:05:25 +02:00
Kseniia Sumarokova
41fa0a54e8
Merge pull request #49729 from kssenii/minor-change-move-log
Move assertions after logging
2023-05-11 23:47:26 +02:00
Robert Schulze
8ca804d40e
Typo: demange.cpp --> demangle.cpp 2023-05-11 21:32:12 +00:00
Vitaly Baranov
478140f8b4 Fix LimitSeekableReadBuffer. 2023-05-11 22:58:05 +02:00
Alexey Milovidov
7c814d0694
Merge pull request #49782 from ClickHouse/tylerhannan-patch-1
Update README.md
2023-05-11 23:55:23 +03:00
Alexey Milovidov
ea979b40a9
Merge pull request #49717 from ClickHouse/disable-mmap-for-server
Disable mmap for StorageFile in clickhouse-server
2023-05-11 23:53:01 +03:00
Han Fei
ef74e64336 address comments 2023-05-11 22:18:08 +02:00
Suzy Wang
70db49cdeb
Merge branch 'master' into s390x_reinterpretas_fix 2023-05-11 14:41:57 -04:00
Denny Crane
fcf1dd52bc
Update settings.md 2023-05-11 14:05:30 -03:00
Robert Schulze
8997c6ef95
Merge pull request #49750 from ClickHouse/rs/msan-randomStringUTF8
Fix msan issue in randomStringUTF8(<uneven number>)
2023-05-11 18:49:12 +02:00
Kruglov Pavel
084a696b54
Merge branch 'master' into fiber-local-var 2023-05-11 17:55:25 +02:00
Vitaly Baranov
ec011b9113
Merge branch 'master' into user-grants-from-config 2023-05-11 17:08:06 +02:00
Mikhail f. Shiryaev
23fd9937a3
Merge pull request #49726 from ClickHouse/require-can-be-tested
Do not launch workflows for PRs w/o "can be tested"
2023-05-11 17:00:45 +02:00
Anton Popov
292cfe12af
Merge branch 'master' into fix-unit-test 2023-05-11 16:56:21 +02:00
Anton Popov
d21dc829d9
Merge branch 'master' into add-forgotten-lock 2023-05-11 16:56:13 +02:00
Anton Popov
84aa97b738 fix arrayMap with array of tuples with single argument 2023-05-11 14:52:01 +00:00
Rich Raposa
2f8a530bf3
Merge pull request #49741 from ClickHouse/rfraposa-patch-2
Update async_insert explanation in docs
2023-05-11 08:36:53 -06:00
Azat Khuzhin
e5c4eb35e8 Merge remote-tracking branch 'u/master' into build/llvm-16
* u/master:
  enable used flags's reinit only when the hash talbe rehash
  Fix build of libfiu on clang-16
  fix flaky test 02504_regexp_dictionary_ua_parser
  fix convertation
  Fix test that expected CH to apply a wrong optimization
  ActionsDAG: remove wrong optimization
2023-05-11 16:32:25 +02:00
Azat Khuzhin
00fdfa115f Suppress MSan warning in NgramDistanceImpl::unrollLowering()
NgramDistanceImpl::unrollLowering() relies on the fact that PODArray has
padding and it is OK to access more items.

Here is an MSan report:

    ==656==WARNING: MemorySanitizer: use-of-uninitialized-value
        0 0x557fd825485f in DB::NgramDistanceImpl<4ul, char8_t, false, true, false>::vectorConstant(DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 63ul, 64ul> const&, DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 63ul, 64ul> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, DB::PODArray<float, 4096ul, Allocator<false, false>, 63ul, 64ul>&) (/usr/bin/clickhouse+0x124d885f) (BuildId: 76773125d8739591c75d4f4d263a2ffe7ca96855)
        1 0x557fd824eb83 in DB::FunctionsStringSimilarity<DB::NgramDistanceImpl<4ul, char8_t, false, true, false>, DB::NameNgramSearchCaseInsensitive>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/usr/bin/clickhouse+0x124d2b83) (BuildId: 76773125d8739591c75d4f4d263a2ffe7ca96855)
        2 0x557fd50023b7 in DB::FunctionToExecutableFunctionAdaptor::executeImpl() const (/usr/bin/clickhouse+0xf2863b7) (BuildId: 76773125d8739591c75d4f4d263a2ffe7ca96855)

      Uninitialized value was stored to memory at
        0 0x557fd4f8da5a in __msan_memcpy (/usr/bin/clickhouse+0xf211a5a) (BuildId: 76773125d8739591c75d4f4d263a2ffe7ca96855)
        1 0x557fd8253803 in DB::NgramDistanceImpl<4ul, char8_t, false, true, false>::vectorConstant(DB::PODArray<char8_t, 4096ul, Allocator<false, false>, 63ul, 64ul> const&, DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 63ul, 64ul> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, DB::PODArray<float, 4096ul, Allocator<false, false>, 63ul, 64ul>&) (/usr/bin/clickhouse+0x124d7803) (BuildId: 76773125d8739591c75d4f4d263a2ffe7ca96855)
        2 0x557fd824eb83 in DB::FunctionsStringSimilarity<DB::NgramDistanceImpl<4ul, char8_t, false, true, false>, DB::NameNgramSearchCaseInsensitive>::executeImpl(std::__1::vector<DB::ColumnWithTypeAndName, std::__1::allocator<DB::ColumnWithTypeAndName>> const&, std::__1::shared_ptr<DB::IDataType const> const&, unsigned long) const (/usr/bin/clickhouse+0x124d2b83) (BuildId: 76773125d8739591c75d4f4d263a2ffe7ca96855)
        3 0x557fd50023b7 in DB::FunctionToExecutableFunctionAdaptor::executeImpl() const (/usr/bin/clickhouse+0xf2863b7) (BuildId: 76773125d8739591c75d4f4d263a2ffe7ca96855)

      Uninitialized value was stored to memory at
        0 0x557fd4f8da5a in __msan_memcpy (/usr/bin/clickhouse+0xf211a5a) (BuildId: 76773125d8739591c75d4f4d263a2ffe7ca96855)
        1 0x5580061699f5 in detail::memcpySmallAllowReadWriteOverflow15Impl(char*, char const*, long) build_docker/./src/Common/memcpySmall.h:42:13
        2 0x5580061699f5 in memcpySmallAllowReadWriteOverflow15(void*, void const*, unsigned long) build_docker/./src/Common/memcpySmall.h:57:5
        3 0x5580061699f5 in DB::ColumnString::replicate(DB::PODArray<unsigned long, 4096ul, Allocator<false, false>, 63ul, 64ul> const&) const build_docker/./src/Columns/ColumnString.cpp:462:13
        4 0x558005d3fae4 in DB::ColumnConst::convertToFullColumn() const build_docker/./src/Columns/ColumnConst.cpp:48:18

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-11 16:30:17 +02:00
Sergei Trifonov
1263c58f64
Merge branch 'master' into async-loader 2023-05-11 16:10:07 +02:00
Mikhail f. Shiryaev
8a664e2cac
Upgrade all lambdas runtime to 3.10, fix requirements
The recent update of urllib3 completely broken the world

- https://github.com/urllib3/urllib3/issues/2168
- https://github.com/boto/botocore/issues/2926
- https://github.com/psf/requests/issues/6443
2023-05-11 16:09:59 +02:00
Diego Nieto (lesandie)
10e0c1d832 Reworked documentation using local cache section 2023-05-11 16:06:14 +02:00
Diego Nieto
8dd13b3fb6
Merge branch 'ClickHouse:master' into master 2023-05-11 15:38:30 +02:00
Diego Nieto (lesandie)
26743b5439 Fix Local Cache documentation explanations 2023-05-11 15:36:47 +02:00
Nikolay Degterinsky
3160483c17 Add query parameters to clickhouse-local 2023-05-11 12:56:59 +00:00
vdimir
fd7374fbc5
Analyzer: fix column not found for optimized prewhere with sample by 2023-05-11 12:38:46 +00:00
Eridanus
1340032c88 improvement(parser): add support for size suffixes in quota creation
statement parameters

This commit adds support for creating quotas with size suffixes in the
parameter list of a quota creation statement. The parser now recognizes
size suffixes such as "KB", "MB", and "GB" and correctly converts them
to their corresponding values in bytes. This feature improves the
usability of the quota creation statement and makes it more flexible.
The commit also includes additional tests to ensure that the new syntax
is parsed correctly.
Attention: we did not support string literal with double like
execute_time = '1.5'
2023-05-11 20:32:59 +08:00