Commit Graph

4307 Commits

Author SHA1 Message Date
Alexey Milovidov
ee502ef6b9 Remove trash (OPTIMIZE CLEANUP) 2023-12-15 22:41:58 +01:00
Nikita Mikhaylov
1780671443
ClickHouse Cloud promotion (#57638)
Co-authored-by: Alexander Sapin <alesapin@gmail.com>
2023-12-15 15:23:23 +01:00
Nikita Mikhaylov
a0af0392cd
Random changes in random files (#57642) 2023-12-14 12:47:11 +01:00
Han Fei
6abe4b113a
Merge pull request #57375 from lingtaolf/feature/more_warnings
Feature/more warnings
2023-12-12 22:48:51 +01:00
Kruglov Pavel
6567fb2c08
Merge pull request #56859 from Avogar/csv-infer-numbers-from-strings
Allow to infer numbers from strings in CSV format
2023-12-12 17:09:02 +01:00
Han Fei
a96593c8b1 Merge branch 'master' into feature/more_warnings 2023-12-12 15:25:01 +01:00
Kruglov Pavel
8a447bf57c
Merge pull request #55892 from Avogar/schema-inference-union
Add 'union' mode for schema inference
2023-12-12 15:02:06 +01:00
avogar
c3a76fcc08 Allow to infer numbers from strings in CSV format 2023-12-11 18:02:05 +00:00
Kruglov Pavel
3b1ffbd77c
Merge branch 'master' into schema-inference-union 2023-12-11 18:59:15 +01:00
kssenii
a06179da00 Merge remote-tracking branch 'origin/master' into fix-materialized-pg-issue-with-generated-columns 2023-12-11 11:15:00 +01:00
avogar
ee7af95bc0 Merge branch 'master' of github.com:ClickHouse/ClickHouse into schema-inference-union 2023-12-08 20:29:28 +00:00
kssenii
ffd0d16f79 Merge remote-tracking branch 'origin/master' into fix-materialized-pg-issue-with-generated-columns 2023-12-08 12:42:21 +01:00
Alexey Milovidov
64e64797ae Update version 2023-12-08 03:15:01 +01:00
Alexey Milovidov
ce9e134043 Merge branch 'master' into CurtizJ-fix-ttl-non-deterministic 2023-12-08 03:10:09 +01:00
kssenii
806061642a Support GENERATED and DEFAULT columns 2023-12-06 15:01:43 +01:00
Alexey Milovidov
76bbeaa676 S3Queue is production ready 2023-12-05 21:10:19 +01:00
Alexey Milovidov
cbea3545aa
Revert "add function getClientHTTPHeader" 2023-12-05 13:34:34 +03:00
Alexey Milovidov
10d65a1ade
Merge pull request #55559 from azat/s3-fix-excessive-reads
Add ability to disable checksums for S3 to avoid excessive input file read
2023-12-05 06:34:21 +01:00
Alexey Milovidov
862171e3a2
Update Settings.h 2023-12-05 08:33:43 +03:00
凌涛
9e05e79d66
Merge branch 'master' into feature/more_warnings 2023-12-05 11:50:05 +08:00
凌涛
6794bbe196 rebase master 2023-12-05 11:42:25 +08:00
Nikita Taranov
c4df0d0428
Decrease default value for filesystem_prefetch_min_bytes_for_single_read_task
Follow up #55841
2023-12-04 23:09:32 +01:00
Alexey Milovidov
02439eee58
Merge pull request #49351 from ClickHouse/async-loader-integration
Asynchronous loading of tables
2023-12-04 17:16:12 +01:00
JackyWoo
8a68d51261
Add index to table system.numbers (#50909) 2023-12-01 19:59:25 +01:00
alesapin
d8bdbf29c4 Merge branch 'master' into make_alter_mat_view_non_experimental 2023-11-30 11:14:25 +01:00
凌涛
d9f4b4d2c0 support parts, tables, databases 2023-11-30 10:56:31 +08:00
Alexander Tokmakov
a2dc2d9a53
Mark a setting obsolete (#57336)
* Update Settings.h

* Update InterpreterUndropQuery.cpp

* Update 02888_obsolete_settings.reference

* Update test.py

* Update 02681_undrop_query.sql

* Update 02681_undrop_query_uuid.sh
2023-11-29 19:24:11 +01:00
Han Fei
4c0efb0262
Merge pull request #53240 from hanfei1991/hanfei/statistic
use statistic to order prewhere conditions better
2023-11-29 12:26:44 +01:00
vdimir
470a092e3d
Merge pull request #51745 from ClickHouse/vdimir/setting_join_algorithm_order
Setting JoinAlgorithm respect specified order
2023-11-29 11:24:39 +01:00
vdimir
b748405976
Intorduce *List definition for muli enum settings 2023-11-28 19:09:02 +00:00
vdimir
a6eb2ad930
Fix JoinStep::describeJoinActions 2023-11-28 19:09:01 +00:00
Han Fei
6733438adc Merge branch 'master' into hanfei/statistic 2023-11-28 16:35:00 +01:00
Alexander Sapin
e1aa62d9cd Make alter materialized view non expiremental and deprecate allow_experimental_alter_materialized_view_structure obsolete 2023-11-28 13:17:55 +01:00
vdimir
af81cb8252
Setting JoinAlgorithm respect specified order 2023-11-28 11:01:35 +00:00
Antonio Andelic
a61f32867e
Merge pull request #56488 from lingtaolf/feature/getHTTPHeader
add function getClientHTTPHeader
2023-11-28 11:41:56 +01:00
Robert Schulze
1448276bae
Merge pull request #55872 from azat/hour-no-leading-zero
Add ability to parse hours/months without leading zeros
2023-11-28 11:07:00 +01:00
Han Fei
7bd2ea3add Merge branch 'master' into hanfei/statistic 2023-11-27 23:31:23 +01:00
Raúl Marín
9bd54be6e0
Merge pull request #57190 from Algunenano/remove_optimize_move_functions_out_of_any
Remove optimize_move_functions_out_of_any optimization
2023-11-27 19:31:38 +01:00
Robert Schulze
a8671049e1
Various smaller fixups 2023-11-27 08:49:54 +00: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
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
Robert Schulze
5b7d2a903d
Merge pull request #57152 from rschu1ze/fine-granular-plan-opt-settings
Fine-granular enablement/disabling of plan-level optimizations
2023-11-25 20:44:23 +01:00
Kseniia Sumarokova
13187bf4f1
Merge pull request #56959 from melvynator/master
Add experimental flag for MaterializedPostgreSQL table engine.
2023-11-24 16:16:42 +01:00
Raúl Marín
d4290ade61 Remove optimize_move_functions_out_of_any optimization 2023-11-24 12:20:46 +01:00
Alexey Milovidov
ade67cc57e Merge branch 'master' of github.com:ClickHouse/ClickHouse into CurtizJ-fix-ttl-non-deterministic 2023-11-23 23:04:11 +01:00
Igor Nikonov
0434044a7e
Merge pull request #57054 from ClickHouse/pr-cleanup-narrow-dependency
Parallel replicas: cleanup, narrow dependency
2023-11-23 20:12:37 +01:00
Robert Schulze
e392fcab5b
Allow global and individual disabling of settings
- 'query_plan_enable_optimizations' is now a global kill switch for all
  plan-level optimizations

- even if it is true, individual optimizations can still be disabled
  individually via their respective settings
2023-11-23 18:46:48 +00:00
Robert Schulze
194e676c70
Put all query plan settings under their own settings 2023-11-23 18:45:08 +00:00
Robert Schulze
77d48e4d55
"optimise" --> "optimize". Sorry, friends from the UK. 2023-11-23 18:41:35 +00:00