Commit Graph

130264 Commits

Author SHA1 Message Date
Robert Schulze
4c236b34f0
Another small cleanup 2023-11-27 11:09:07 +00:00
vdimir
bbc202a891
Merge pull request #56816 from AVMusorin/improve-settings-rocksdb
Show total_bytes and total_rows in system tables for RocksDB storage
2023-11-27 11:42:15 +01:00
Antonio Andelic
3941520cb0 Avoid memory exceptions in asio workers 2023-11-27 10:08:06 +00:00
Raúl Marín
829c2b2355 Clang-tidy detected problems 2023-11-27 11:00:27 +01:00
Raúl Marín
93893247cf Update references after updating the ASTFunction hash function 2023-11-27 11:00:27 +01:00
Raúl Marín
2e24639d46 Fix updateTreeHashImpl 2023-11-27 11:00:27 +01:00
Raúl Marín
56b15a7294 Fix style 2023-11-27 11:00:27 +01:00
Raúl Marín
bada4a561c Small cleanup 2023-11-27 11:00:27 +01:00
Raúl Marín
4484c42609 More tests around respect nulls 2023-11-27 11:00:27 +01:00
Raúl Marín
4250c6626c Move handling of RESPECT NULLS outside of the parser 2023-11-27 11:00:27 +01:00
Raúl Marín
d8ac46e064 Make RESPECT NULLS case insensitive and compatible with combinators 2023-11-27 11:00:27 +01:00
vdimir
9e7c7fb638 Explicitly enable analyzer in 02662_first_last_value 2023-11-27 11:00:27 +01:00
Raúl Marín
f0e832a6b9 Move respect nulls constructors to implementation file 2023-11-27 11:00:27 +01:00
Raúl Marín
a3e342a477 Separate first_value and first_value_respect_nulls states 2023-11-27 11:00:27 +01:00
Kruglov Pavel
b10e46b2bc
Merge pull request #57126 from Avogar/size-virtual-column
Add _size virtual column to s3/file/hdfs/url/azureBlobStorage engines
2023-11-27 10:12:18 +01:00
Raúl Marín
deea84cac1 Adjust a test so it's a valid query 2023-11-27 10:11:14 +01:00
Robert Schulze
a8671049e1
Various smaller fixups 2023-11-27 08:49:54 +00:00
Antonio Andelic
4c2de5219d
Merge pull request #57196 from amosbird/fix-57194
Fix incorrect JOIN plan optimization with partially materialized normal projection
2023-11-27 09:15:13 +01:00
Justin de Guzman
cc57e67e83
Fix docs check erorr 2023-11-26 23:57:33 -08:00
Bharat Nallan Chakravarthy
346dec71cd remove hostname from getDefaultOrderBy() 2023-11-26 23:03:44 -08:00
flynn
aa15a4e46d Merge branch 'master' of github.com:ClickHouse/ClickHouse into alias_column_in_indices 2023-11-27 03:52:00 +00:00
flynn
f995ac87c5 review fix 2023-11-27 03:50:34 +00:00
taiyang-li
f33f231725 fix failed ut 2023-11-27 10:48:01 +08:00
Bharat Nallan Chakravarthy
6454687fa6 Merge remote-tracking branch 'upstream/master' into ncb/hostname-system-log-tables 2023-11-26 16:24:18 -08:00
Nikolay Degterinsky
de0876ed68
Merge pull request #57234 from evillique/fix-docs-anchors
Fix docs
2023-11-27 01:22:43 +01:00
Nikolay Degterinsky
124fae7549 Fix style 2023-11-26 23:58:34 +00:00
serxa
62831d235f support multiple lines on dashboard charts 2023-11-26 23:28:11 +00:00
Nikolay Degterinsky
dd49b46ca5 Fix style 2023-11-26 22:32:11 +00:00
serxa
9d6a9d3573 do not rethrow load errors during db shutdown 2023-11-26 19:31:39 +00:00
Nikolay Degterinsky
faa3a43803 Fix docs 2023-11-26 19:21:39 +00:00
Azat Khuzhin
1168b7910b Update test_throttling with enabled s3_disable_checksum
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-11-26 20:03:33 +01:00
Azat Khuzhin
4a02de4674 Add ability to disable checksums for S3 to avoid excessive input file read
AWS S3 client can read file multiple times, this is required for:
- calculate checksums
- calculate signature (done only for HTTP, since ClickHouse uses
  PayloadSigningPolicy::Never)

So this means that for HTTP, to send file to S3 it will be read 3x
times, and for HTTPS 2x times.

By overriding GetChecksumAlgorithmName() to return empty string,
checksums can be disabled, and the input file will be read only once.

And even though additional https layer adds extra integrity layer,
someone still may find this too risky I guess, even though ClickHouse
internal format (for MergeTree) has checksums, and more.

Here is an example stacktrace of this excessive read:

<details>

<summary>stacktrace</summary>

    (lldb) bt
    * thread 383, name = 'BackupWorker', stop reason = breakpoint 1.1
      * frame 0: 0x00000000103c5fc0 clickhouse`DB::StdStreamBufFromReadBuffer::seekpos() + 32 at StdStreamBufFromReadBuffer.cpp:67
        frame 1: 0x000000001777f7f8 clickhouse`std::__1::basic_istream<char, std::__1::char_traits<char>>::tellg() [inlined] std::__1::basic_streambuf<char, std::__1::char_traits<char>>::pubseekoff[abi:v15000](this=<unavailable>, __off=0, __way=cur, __which=8) + 120 at streambuf:162
        frame 2: 0x000000001777f7e3 clickhouse`std::__1::basic_istream<char, std::__1::char_traits<char>>::tellg() + 99 at istream:1249
        frame 3: 0x00000000152e4979 clickhouse`Aws::Utils::Crypto::MD5OpenSSLImpl::Calculate() + 57 at CryptoImpl.cpp:223
        frame 4: 0x00000000152dedee clickhouse`Aws::Utils::Crypto::MD5::Calculate() + 14 at MD5.cpp:30
        frame 5: 0x00000000152db5ac clickhouse`Aws::Utils::HashingUtils::CalculateMD5() + 44 at HashingUtils.cpp:235
        frame 6: 0x000000001528b97b clickhouse`Aws::Client::AWSClient::AddChecksumToRequest() const + 507 at AWSClient.cpp:772
        frame 7: 0x000000001528ded2 clickhouse`Aws::Client::AWSClient::BuildHttpRequest() const + 1682 at AWSClient.cpp:930
        frame 8: 0x00000000100b864f clickhouse`DB::S3::Client::BuildHttpRequest() const + 15 at Client.cpp:622
        frame 9: 0x0000000015286a41 clickhouse`Aws::Client::AWSClient::AttemptOneRequest(this=0x00007ffde2f8f000, httpRequest=<unavailable>, request=<unavailable>, signerName=<unavailable>, signerRegionOverride=<unavailable>, signerServiceNameOverride="s3") const + 65 at AWSClient.cpp:491
        frame 10: 0x00000000152845b9 clickhouse`Aws::Client::AWSClient::AttemptExhaustively(this=0x00007ffde2f8f000, uri=0x00007ffdd4d44f38, request=0x00007ffdd4d45d10, method=HTTP_PUT, signerName="SignatureV4", signerRegionOverride="us-east-1", signerServiceNameOverride="s3") const + 1337 at AWSClient.cpp:272
        frame 11: 0x0000000015298d0d clickhouse`Aws::Client::AWSXMLClient::MakeRequest() const + 45 at AWSXmlClient.cpp:99
        frame 12: 0x0000000015298cb5 clickhouse`Aws::Client::AWSXMLClient::MakeRequest() const + 309 at AWSXmlClient.cpp:66
        frame 13: 0x0000000015354b23 clickhouse`Aws::S3::S3Client::PutObject(this=0x00007ffde2f8f000, request=0x00007ffdd4d45d10) const + 2659 at S3Client.cpp:1731
        frame 14: 0x00000000100b174f clickhouse`DB::S3::Client::PutObject(DB::S3::ExtendedRequest<Aws::S3::Model::PutObjectRequest> const&) const [inlined]
        frame 15: 0x00000000100b173a clickhouse`DB::S3::Client::PutObject(DB::S3::ExtendedRequest<Aws::S3::Model::PutObjectRequest> const&) const + 41 at Client.cpp:578
        frame 16: 0x00000000100b1711 clickhouse`DB::S3::Client::PutObject(DB::S3::ExtendedRequest<Aws::S3::Model::PutObjectRequest> const&) const + 981 at Client.cpp:508
        frame 17: 0x00000000100b133c clickhouse`DB::S3::Client::PutObject(DB::S3::ExtendedRequest<Aws::S3::Model::PutObjectRequest> const&) const [inlined]
        frame 18: 0x00000000100b133c clickhouse`DB::S3::Client::PutObject() const + 28 at Client.cpp:418
        frame 19: 0x00000000103b96d6 clickhouse`DB::copyDataToS3File()

</details>

This new behaviour could be enabled with `s3_disable_checksum=true`.

Note, that I've checked this implementation with GCS/R2/S3/MinIO and it
works everywhere.
2023-11-26 19:20:19 +01:00
Azat Khuzhin
315906b380 Add ability to parse hours/months without leading zeros
Recently I was looking into one dataset, that has such format.

So I've changed the meaning of the following formatters for
formatDateTime()/parseDateTime(), like in other implementations [1]:

- %l/%k - to handle hours without leading zeros
- %c - handle months without leading zeros

  [1]: https://www.php.net/strftime

And since this is kind of behaviour change (even though it is unlikely
will break something), there is a new setting to control this new
behaviour:
- parsedatetime_enable_format_without_leading_zeros=1 (default ON)
- formatdatetime_enable_format_without_leading_zeros=0 (default OFF, since this could change users output)

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-11-26 19:10:17 +01:00
Alexey Milovidov
a9bb76378f
Merge pull request #56724 from canhld94/ch_replicated_column_mismatch
Do not allow tables on different replicas have different aggregate functions in SimpleAggregateFunction column
2023-11-26 17:20:10 +01:00
Alexey Milovidov
588fd16518
Merge pull request #57230 from ClickHouse/remove-bad-test
Remove test `01280_ttl_where_group_by`
2023-11-26 04:38:16 +01:00
Alexey Milovidov
1cc33f3430
Merge pull request #56164 from azat/not-byte-identical-message
Add more details to "Data after merge is not byte-identical to data on another replicas"
2023-11-26 04:14:15 +01:00
Alexey Milovidov
f8ebe5134d
Merge pull request #55836 from azat/dist/limit-by-fix
RFC: Fix "Cannot find column X in source stream" for Distributed queries with LIMIT BY
2023-11-26 04:03:41 +01:00
Alexey Milovidov
304d6375be
Merge pull request #56225 from azat/rocksdb-compact
Allow manual compaction of rocksdb via OPTIMIZE query
2023-11-26 03:59:54 +01:00
Alexey Milovidov
36cc857441
Merge pull request #57232 from ClickHouse/revert-57170-tests/01600_parts_types_metrics
Revert "Add debugging info for 01600_parts_types_metrics on failures"
2023-11-26 03:58:09 +01:00
Alexey Milovidov
32da588d5e
Revert "Add debugging info for 01600_parts_types_metrics on failures" 2023-11-26 05:57:54 +03:00
Alexey Milovidov
fde14f0daf
Merge pull request #57191 from azat/client-log_comment-file
[RFC] Set log_comment to the file name while processing files in client
2023-11-26 03:44:40 +01:00
jsc0218
96a445d3ac Update Libpqxx for Mem Leak 2023-11-26 02:12:41 +00:00
Alexey Milovidov
f636dea879
Merge pull request #54327 from den-crane/background_fetches_pool_size
increase background_fetches_pool_size to 16, background_schedule_pool_size to 512
2023-11-26 02:50:38 +01:00
Alexey Milovidov
9fa112af9a
Merge pull request #53721 from takakawa/possible_wrong_type_conversion_bugfix
[bugfix] possible postgresql logical replication error: wrong type conversion
2023-11-26 02:48:24 +01:00
Alexey Milovidov
b92c416ced Remove test 01280_ttl_where_group_by 2023-11-26 02:34:18 +01:00
Alexey Milovidov
f63048e2d6
Merge pull request #57229 from ClickHouse/revert-57222-update-sentry
Revert "Update Sentry"
2023-11-26 02:30:17 +01:00
Alexey Milovidov
e60941f7c5
Revert "Update Sentry" 2023-11-26 04:30:05 +03:00
robot-ch-test-poll1
a956cec61f
Merge pull request #57228 from rschu1ze/docs-alias
Docs: Mention alias `database` for `name` in `system.databases`
2023-11-26 02:25:32 +01:00
Robert Schulze
e074629749
Docs: Mention alias 'database' for 'name' in system.databases 2023-11-25 22:04:49 +00:00
Alexey Milovidov
d29092f8af
Merge pull request #54909 from canhld94/revert-54893-revert-54819-ch_net_interfaces
Resubmit: Avoid excessive calls to getifaddrs in isLocalAddress
2023-11-25 23:00:18 +01:00