Commit Graph

13674 Commits

Author SHA1 Message Date
Sema Checherinda
991584506f fix a bug when files are finalizated after first write 2023-07-26 12:42:18 +04:00
Nikita Mikhaylov
1dc9ca2c24
Merge pull request #52549 from ClickHouse/whitespace-before-comma
Check for punctuation
2023-07-25 20:30:36 +02:00
Anton Popov
2c7c38950d better check for lightweight deletes 2023-07-25 14:21:12 +00:00
Alexander Tokmakov
328d0a5269 fix 2023-07-25 14:50:27 +02:00
Anton Popov
568afbbec3 added field with refcount to system.remote_data_paths table 2023-07-25 12:33:15 +00:00
Smita Kulkarni
22fec136c1 Create new StorageView with substituted parameters for every SELECT query of a parameterized view 2023-07-25 14:04:55 +02:00
robot-ch-test-poll4
fe6cd14a48
Merge pull request #52527 from Algunenano/mergetree_cleanup
Remove unused code
2023-07-25 07:41:42 +02:00
Alexey Milovidov
21382afa2b Check for punctuation 2023-07-25 06:10:04 +02:00
Alexey Milovidov
168b84a592
Merge pull request #52337 from Avogar/no-decode-url
Allow to disable decoding/encoding path in uri in URL engine
2023-07-25 05:43:06 +03:00
Alexander Tokmakov
edc479bbf8 fix 2023-07-24 23:40:27 +02:00
Alexey Milovidov
3c034d563b
Merge pull request #52068 from azat/replicated-cluster-prep1
Preparations for Trivial Support For Resharding (part1)
2023-07-24 22:57:44 +03:00
Kseniia Sumarokova
265e1437a3
Merge branch 'master' into add-alias 2023-07-24 21:52:41 +02:00
Kseniia Sumarokova
e05e0ec557
Merge pull request #52318 from valbok/utf8-names
MaterializedMySQL: Support unquoted utf-8 strings in DDL
2023-07-24 21:49:33 +02:00
Kruglov Pavel
fec5675cd4
Merge branch 'master' into better-progress-bar-2 2023-07-24 19:59:38 +02:00
Alexander Tokmakov
032956dd1e fix 2023-07-24 18:42:02 +02:00
Alexey Milovidov
01993bef5b
Merge pull request #52489 from ClickHouse/incbin
Faster startup of clickhouse-client and clickhouse-local
2023-07-24 18:42:24 +03:00
Alexander Tokmakov
faca49a905 Merge branch 'master' into add_delay_for_replicated 2023-07-24 16:07:38 +02:00
Nikolay Degterinsky
40652cf2de
Merge pull request #51899 from evillique/describe-table-settings
Allow SETTINGS before FORMAT in DESCRIBE TABLE query
2023-07-24 15:24:41 +02:00
Raúl Marín
c7239c64ea Remove unused code 2023-07-24 15:16:44 +02:00
Anton Popov
2471b032ab fix lightweight delete after drop of projection 2023-07-24 09:52:49 +00:00
Val Doroshchuk
efa638ef3c MaterializedMySQL: Support unquoted utf-8 strings in DDL
Since ClickHouse does not support unquoted utf-8 strings but MySQL does.

Instead of fixing Lexer to recognize utf-8 chars as TokenType::BareWord,
suggesting to quote all unrecognized tokens before applying any DDL.

Actual parsing and validating the syntax will be done by particular Parser.

If there is any TokenType::Error, the query is unable to be parsed anyway.
Quoting such tokens can provide the support of utf-8 names.

See `tryQuoteUnrecognizedTokens` and `QuoteUnrecognizedTokensTest`.

mysql> CREATE TABLE 道.渠(...

is converted to

CREATE TABLE `道`.`渠`(...

Also fixed the bug with missing * while doing SELECT in full sync because db or table name are back quoted when not needed.
2023-07-24 11:12:10 +02:00
Alexey Milovidov
f17844e9c2
Merge pull request #51037 from azat/dist/optimize_skip_unused_shards-join-fix
Fix optimize_skip_unused_shards with JOINs
2023-07-24 08:31:00 +03:00
Azat Khuzhin
4a33e027c5 Split StorageReplicatedMergeTree reading methods
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-07-24 05:50:44 +02:00
Azat Khuzhin
83c0f03b98 Change signature of the updateSettingsForCluster() to avoid cluster requirement
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-07-24 05:50:44 +02:00
Azat Khuzhin
d7f7f16fbc Introduce IStorage::supportsTrivialCountOptimization()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-07-24 05:50:44 +02:00
Alexey Milovidov
a1a79eee0f
Merge pull request #51383 from ClickHouse/fix-potentially-bad-code
Remove suspicious code
2023-07-24 06:46:31 +03:00
Alexey Milovidov
eb5038f3e9
Merge pull request #52295 from ClickHouse/allow_vertical_merges_from_compact_to_wide_parts
Enable `allow_vertical_merges_from_compact_to_wide_parts` by default
2023-07-24 06:44:33 +03:00
Alexey Milovidov
a17652a422 Merge branch 'master' into incbin 2023-07-24 05:33:52 +02:00
Alexey Milovidov
1bc83afa54
Merge branch 'master' into fix-potentially-bad-code 2023-07-24 03:02:57 +03:00
Alexey Milovidov
890bda177d Merge branch 'master' into allow_vertical_merges_from_compact_to_wide_parts 2023-07-24 00:57:48 +02:00
kssenii
f207e5bf11 Add TODO 2023-07-24 00:31:37 +02:00
Alexey Milovidov
1e467867e6 Attempt to fix LTO 2023-07-24 00:03:40 +02:00
Alexey Milovidov
7ff3579115
Merge pull request #49631 from ClickHouse/sparse-columns-by-default
Enable Sparse columns by default
2023-07-23 21:18:05 +03:00
Alexey Milovidov
c8f8a23c71 Fix errors 2023-07-23 06:11:03 +02:00
Alexey Milovidov
4170d1458b Use incbin for resources, part 2 2023-07-23 06:11:03 +02:00
Alexey Milovidov
00d6f2ee08 Use incbin for resources, part 1 2023-07-23 06:11:03 +02:00
Alexey Milovidov
d9d8782684
Merge branch 'master' into dist/optimize_skip_unused_shards-join-fix 2023-07-23 01:29:38 +03:00
alesapin
d1fa105d60
Merge branch 'master' into add_delay_for_replicated 2023-07-23 00:12:29 +02:00
Igor Nikonov
2d33661594
Merge branch 'master' into fix-potentially-bad-code 2023-07-22 22:48:07 +02:00
robot-ch-test-poll3
c9eb144e15
Merge pull request #50826 from ucasfl/is_obsolete
Add a column is_obsolete to system.settings and similar tables
2023-07-22 22:43:11 +02:00
Alexey Milovidov
b869466a6a
Merge branch 'master' into sparse-columns-by-default 2023-07-22 19:34:29 +03:00
Kseniia Sumarokova
d34f2bed07
Merge pull request #51386 from bigo-sg/fix_hdfs_read_buffer_heap_overflow
Fix heap overflow in read buffer from hdfs when read_until_position is not zero
2023-07-22 15:00:58 +02:00
Kseniia Sumarokova
234a0fa7bc
Merge branch 'master' into add-alias 2023-07-22 14:48:49 +02:00
kssenii
4fc3d0b290 Merge remote-tracking branch 'upstream/master' into s3queue 2023-07-22 14:45:38 +02:00
alesapin
6416fb6eed
Merge branch 'master' into add_delay_for_replicated 2023-07-22 12:11:39 +02:00
Azat Khuzhin
20625d75ab Fix optimize_skip_unused_shards with JOINs
In case of JOIN query may contains conditions for other tables, while
optimize_skip_unused_shards was pretty dumb and failed to skip such
columns.

Fix this by removing JOIN before applying this optimization.

v2: restriction for analyzer
v3: ignore 01940_custom_tld_sharding_key under analyzer
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Co-Authored-By: Alexey Milovidov <milovidov@clickhouse.com>
2023-07-22 07:45:33 +02:00
Alexey Milovidov
9dc988981e
Merge branch 'master' into is_obsolete 2023-07-22 04:59:26 +03:00
Alexey Milovidov
8e04503d1c
Merge pull request #52325 from azat/mergetree-log-entries-time
MergeTree/ReplicatedMergeTree should use server timezone for log entries
2023-07-22 03:29:39 +03:00
robot-clickhouse
9280f4a9fd
Merge pull request #51958 from ClickHouse/prewhere_and_pk_columns
Move conditions with columns from PK to the end of PREWHERE chain
2023-07-22 00:05:41 +02:00
alesapin
ed97284bfa
Update src/Storages/StorageReplicatedMergeTree.cpp 2023-07-21 19:28:28 +02:00
Nikolai Kochetov
01cb502af3
Merge pull request #52151 from amosbird/fix_52075
Fix incorrect projection analysis when aggregation expression contains monotonic functions
2023-07-21 18:30:27 +02:00
Alexander Sapin
a2b170a18e Avoid exception which I didn't understand 2023-07-21 17:42:55 +02:00
Antonio Andelic
6ed97a944f
Merge pull request #49450 from myrrc/feature/keeper-dyn-reconf
`reconfig` support for CH Keeper
2023-07-21 15:59:25 +02:00
Nikolai Kochetov
b5cf644668
Check projection metadata the same way we check ordinary metadata. (#52361)
* Check projection metadata the same way we check ordinary metadata.

* Allow aggregate projection to have empty PK

---------

Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
2023-07-21 16:23:04 +03:00
robot-clickhouse-ci-2
0db9c79886
Merge pull request #52332 from rschu1ze/better-formatsettings
Minor: Less awkward IAST::FormatSettings
2023-07-21 14:49:58 +02:00
robot-ch-test-poll4
62e01df545
Merge pull request #52104 from filimonov/last_removal_attempt_time_typo
Fix typo last_removal_attemp_time
2023-07-21 14:49:36 +02:00
Alexey Milovidov
dc0abd38a9
Merge pull request #52376 from Algunenano/hot_cold_zero_copy
[RFC] Wait for zero copy replication lock even if some disks don't support it
2023-07-21 15:28:41 +03:00
Antonio Andelic
59ad2d9acc
Merge branch 'master' into feature/keeper-dyn-reconf 2023-07-21 14:08:26 +02:00
Alexander Tokmakov
d9161c7276
Merge pull request #52382 from ClickHouse/tavplubix-patch-8
Less replication errors
2023-07-21 14:58:25 +03:00
Kseniia Sumarokova
1c2fea4980
Merge pull request #52381 from ClickHouse/kssenii-patch-7
Follow up to #49698
2023-07-21 13:51:33 +02:00
Antonio Andelic
10c2d5dade
Merge branch 'master' into feature/keeper-dyn-reconf 2023-07-21 13:24:18 +02:00
Alexander Sapin
714a3a8d12 Don't do it on drop 2023-07-21 12:23:22 +02:00
Amos Bird
68e7583dbf
reorganize tests and add some comments 2023-07-21 14:54:51 +08:00
Amos Bird
9b0eb9cdd7
ignore ast opt when doing projection calc 2023-07-21 14:54:48 +08:00
Alexander Gololobov
fe7cff5c1c Added move_primary_key_columns_to_end_of_prewhere setting 2023-07-21 08:14:57 +02:00
Alexander Gololobov
51e81b37a4 Move condtions with columns from PK to the end of PREWHERE chain 2023-07-21 08:14:57 +02:00
Alexander Gololobov
06c1e686a4
Merge pull request #46365 from ClickHouse/split_prewhere_dag_test_enable
Multi-stage PREWHERE enabled by default
2023-07-21 08:13:55 +02:00
Alexander Tokmakov
09e6bbc0e2
Update DataPartsExchange.cpp 2023-07-20 21:10:59 +03:00
Kseniia Sumarokova
045ecdf71f
Update src/Storages/PostgreSQL/MaterializedPostgreSQLConsumer.cpp
Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
2023-07-20 19:03:06 +02:00
Kseniia Sumarokova
500f1e6757
Follow up to #49698 2023-07-20 18:55:41 +02:00
kssenii
d2195cff11 Small fixes 2023-07-20 18:21:37 +02:00
Raúl Marín
13f8d72f54 Wait for zero copy replication lock even if some disks don't support it 2023-07-20 18:04:26 +02:00
robot-ch-test-poll
21f22c4043
Merge pull request #49698 from kssenii/fix-pg-sync-tables-exception-broken-sync
Fix materialised pg syncTables
2023-07-20 15:38:18 +02:00
Nikita Mikhaylov
668062dc29
Merge branch 'master' into no-keep-context-lock-while-calculating-access 2023-07-20 14:42:13 +02:00
avogar
fe934d3059 Make better 2023-07-20 12:38:41 +00:00
Nikita Mikhaylov
b8f73db4d1
Merge branch 'master' into happy_grandma 2023-07-20 14:26:31 +02:00
Alexander Tokmakov
2b29e3dc83
Update MergeTreeBackgroundExecutor.cpp (#52261) 2023-07-20 14:22:22 +03:00
Robert Schulze
bd761c365a
Make serializeAST() more regular 2023-07-20 10:39:26 +00:00
Alexander Gololobov
03a890f91c
Merge branch 'master' into filter_system_databases 2023-07-20 12:38:15 +02:00
Robert Schulze
25ddcc256b
Make IAST::FormatSettings more regular, pt. III 2023-07-20 10:34:05 +00:00
Robert Schulze
9933589c56
Merge pull request #52312 from rschu1ze/beautify-system-query-cache
Beautify pretty-printing of the query string in SYSTEM.QUERY_CACHE
2023-07-20 12:20:04 +02:00
Nikita Mikhaylov
ec20786940
Merge pull request #52347 from vitlibar/zooKeeper-retries-control-rethrows-with-original-callstack
ZooKeeperRetriesControl rethrows with original callstack
2023-07-20 12:14:04 +02:00
Vitaly Baranov
27ca367b2c ZooKeeperRetriesControl rethrows with original callstack. 2023-07-20 10:25:38 +02:00
avogar
2b8e4ebd4c Allow to disable decoding/encoding path in uri in URL engine 2023-07-19 19:48:39 +00:00
Alexander Sapin
544081163d Remove redundant deactivate 2023-07-19 17:21:01 +02:00
Han Fei
6bbdf702ae
Merge branch 'master' into hanfei/support-insert-token 2023-07-19 17:05:12 +02:00
alesapin
b34655e743
Update src/Storages/StorageReplicatedMergeTree.cpp
Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
2023-07-19 17:05:03 +02:00
Nikita Mikhaylov
4a3f5234af
Merge pull request #51038 from evillique/headers-blacklist
Add HTTP header filtering
2023-07-19 15:49:12 +02:00
Azat Khuzhin
53818dde8c MergeTree/ReplicatedMergeTree should use server timezone for log entries
Otherwise session_timezone/use_client_time_zone will break things

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-07-19 15:25:15 +02:00
Robert Schulze
3eb23d899f
Merge remote-tracking branch 'rschu1ze/master' into beautify-system-query-cache 2023-07-19 12:55:09 +00:00
alesapin
45a7134478
Merge branch 'master' into feature/keeper-dyn-reconf 2023-07-19 14:04:59 +02:00
alesapin
f8fa79c30f
Merge branch 'master' into fix_test_producing_no_such_key 2023-07-19 11:59:23 +02:00
xiedeyantu
d0e886070c system.events and system.metrics tables add column name as an alias to event and metric 2023-07-19 17:39:00 +08:00
Robert Schulze
f22452c78c
Beautify pretty-printing of the query string in SYSTEM.QUERY_CACHE.
Output of SYSTEM.QUERY_CACHE

- before this PR:

    SELECT * FROM system.query_cache

    Query id: 4989008b-b84c-4e57-bfe5-7fb551814812

    Row 1:
    ──────
    query:   	   SELECT 1 SETTINGS
    [...]

- after this PR:

    SELECT * FROM system.query_cache

    Query id: 4989008b-b84c-4e57-bfe5-7fb551814812

    Row 1:
    ──────
    query:   	   SELECT 1 SETTINGS use_query_cache = 1
    [...]
2023-07-19 09:10:26 +00:00
Sema Checherinda
ed5310ce48
Merge branch 'master' into last_removal_attempt_time_typo 2023-07-19 10:23:25 +02:00
Han Fei
e8be6ec23f
Merge branch 'master' into hanfei/support-insert-token 2023-07-19 10:06:03 +02:00
robot-clickhouse-ci-1
32b765a4ba
Merge pull request #50559 from zvonand/zvonand-issue-49290
Add support for multi-directory globs
2023-07-19 06:24:38 +02:00
Alexey Milovidov
d666272b76 Enable allow_vertical_merges_from_compact_to_wide_parts by default 2023-07-19 05:29:12 +02:00
Alexey Milovidov
6a61786959 Merge branch 'master' into sparse-columns-by-default 2023-07-19 01:07:59 +02:00
Kseniia Sumarokova
1545ad3389
Merge branch 'master' into fix-pg-sync-tables-exception-broken-sync 2023-07-18 23:19:01 +02:00