Robert Schulze
c668ddd506
Make ASTSelectQuery::formatImpl() more robust
...
Fixes #45204
The problem is that ASTSelectQuery::group_by_with_grouping_sets == true
implies ASTSelectQuery::groupBy() but sometimes this wasn't the case. I
added a sanity check a few months ago but had no idea how the AST became
corrupt.
All crashes/exceptions were during AST fuzzing. Looking at
Client/QueryFuzzer.cpp, there is a very small chance to run into the
issue. In detail:
1. In QueryFuzzer::fuzz(), we find that the AST is a ASTSelectQuery and
groupBy() returns true.
2. With small probability, we do
select->group_by_with_grouping_sets = !select->group_by_with_grouping_sets;
where the (default false) group_by_with_grouping_sets flips true.
3. With small probability, we change the expression type in the
following WHERE or PREWHERE if-branches.
This situation is illegal. One possibility is changing the fuzzing code
to not generate it. The fuzzing code is however generic, and doesn't
really care about such details. Therefore, instead add an (theoretically
unnecessary) extra check to ASTSelectQuery::formatImpl() for robustness.
2023-02-25 22:28:00 +00:00
Alexey Milovidov
c69f8f9712
Merge pull request #46836 from den-crane/patch-64
...
Doc. Examples for DEFAULT/MATERIALIZED/EPHEMERAL/ALIAS
2023-02-26 00:26:11 +03:00
Alexey Milovidov
88704c4d9f
Fix flaky test_concurrent_queries_restriction_by_query_kind
2023-02-25 22:23:29 +01:00
Robert Schulze
fbba9e319d
Merge branch 'master' into rs/periods-in-kafka-topics
2023-02-25 21:45:20 +01:00
Robert Schulze
a402b61ceb
Merge pull request #46819 from ClickHouse/rs/fix-slowhyperscanchecker
...
Fix SlowWithHyperscanChecker
2023-02-25 21:41:38 +01:00
Azat Khuzhin
03e90cd7cf
Add new metrics to system.asynchronous_metrics
...
The following metrics can be useful to calculate various rates (i.e.
disk/network IO rates):
- AsynchronousHeavyMetricsUpdateInterval
- AsynchronousMetricsUpdateInterval
The following had been added by analogy with the
AsynchronousMetricsCalculationTimeSpent:
- AsynchronousHeavyMetricsCalculationTimeSpent
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-25 21:13:15 +01:00
Alexey Milovidov
1ca6156b07
Merge pull request #46853 from ClickHouse/clickhouse-local-open-files
...
Increase the limit on the number of opened files in `clickhouse-local`
2023-02-25 22:57:33 +03:00
Alexey Milovidov
c4bf503690
Merge pull request #46850 from ClickHouse/add-test-45214
...
Add a test for #45214
2023-02-25 22:56:26 +03:00
Alexey Milovidov
93dffb13c2
Merge pull request #46848 from ClickHouse/add-test-43184
...
Add a test for #43184
2023-02-25 22:56:05 +03:00
Alexey Milovidov
25853da4ad
Merge pull request #46846 from ClickHouse/better-fatal-handling
...
Better handling of fatal errors
2023-02-25 22:55:14 +03:00
Alexey Milovidov
ffd512c90e
Merge pull request #46847 from ClickHouse/max-intersections-msan
...
Fix MSan report in `maxIntersections` function
2023-02-25 22:53:55 +03:00
Alexey Milovidov
c0de7be37c
Merge pull request #46845 from ClickHouse/a-new-trap
...
Add a trap
2023-02-25 22:53:08 +03:00
Alexey Milovidov
b3c6a33a4d
Merge pull request #46844 from ClickHouse/fix-strange-code
...
Non-significant change
2023-02-25 22:52:50 +03:00
Alexey Milovidov
1a604f834c
Merge pull request #46857 from azat/tests/final-expect-fixes
...
Final fixes for expect tests
2023-02-25 22:49:08 +03:00
Alexey Milovidov
d09025fc40
Merge pull request #46868 from DanRoscigno/add-prod-note
...
add note about prod install
2023-02-25 22:47:00 +03:00
Robert Schulze
15ece2ab16
Fix incorrect LIKE-to-substring translation
...
To be backported
2023-02-25 19:46:59 +00:00
SmitaRKulkarni
4109fbd7cf
Merge pull request #46517 from azat/tests/fix-backup-restore-flakiness
...
Fix flakiness of test_backup_restore_on_cluster/test_disallow_concurrency
2023-02-25 19:54:21 +01:00
Robert Schulze
cf062f0c5b
Small optimization of LIKE patterns with > 1 trailing %
...
Previously, LIKE pattern '%%%ab' became '.*.*ab'. Now, it becomes 'ab'
which is a bit faster (perhaps).
+ minor code cleanup + a minor doc update
2023-02-25 18:50:32 +00:00
Robert Schulze
2fd28b9eac
Merge pull request #46867 from ClickHouse/rs/escaping-docs
...
Fix escaping description in LIKE function docs
2023-02-25 18:44:20 +01:00
Rich Raposa
9e6c6e86e2
Merge pull request #46866 from ClickHouse/rfraposa-patch-2
...
Update tuple-map-functions.md
2023-02-25 10:33:48 -07:00
DanRoscigno
138a050e13
fix section name
2023-02-25 12:22:02 -05:00
DanRoscigno
ca06ad48e4
add note about prod install
2023-02-25 12:17:33 -05:00
Robert Schulze
01e7f41c79
Fix escaping descriptionn in LIKE function docs
2023-02-25 17:13:57 +00:00
Rich Raposa
6e2cec9ab6
Update tuple-map-functions.md
2023-02-25 10:03:32 -07:00
Alexander Gololobov
9183933330
Merge pull request #46856 from ClickHouse/fix-msan-report-map
...
Fix a bug in `Map` data type
2023-02-25 17:20:58 +01:00
Robert Schulze
3618e37dd2
Reduce indentation by early out
2023-02-25 15:36:59 +00:00
Sema Checherinda
0c9643f1ed
make listing in parrallel as well
2023-02-25 16:27:27 +01:00
Robert Schulze
960a0b6582
Merge pull request #46858 from ClickHouse/rs/escaping-docs
...
Minor fixup of string escaping syntax docs
2023-02-25 16:24:17 +01:00
Robert Schulze
d74632cdb7
Minor fixup of string escaping syntax docs
2023-02-25 15:23:15 +00:00
Robert Schulze
95c2d0131a
Merge branch 'master' into rs/fix-slowhyperscanchecker
2023-02-25 16:09:01 +01:00
Alexander Gololobov
7606d2406b
Check that argument sizes and result size match
2023-02-25 14:47:45 +01:00
Alexander Gololobov
d8c5da1a50
A test to check that computed value is equal in all rows
2023-02-25 14:46:23 +01:00
Anton Popov
37570f10ea
Merge pull request #46364 from CurtizJ/add-query-id-in-response
...
Add `X-ClickHouse-Query-Id` header in all queries
2023-02-25 14:18:35 +01:00
Nikolai Kochetov
57b5f9e7d7
Fix case with no detached parts for table.
2023-02-25 13:33:20 +01:00
Sema Checherinda
e2bfa83429
cancel workers when exception
2023-02-25 13:33:20 +01:00
Sema Checherinda
08dc874a37
do not run support threads if no tasks left
2023-02-25 13:33:20 +01:00
Sema Checherinda
e5cbe4311e
create limites count of support threads for a block
2023-02-25 13:33:20 +01:00
Sema Checherinda
ef0c1841af
work with comments on review
2023-02-25 13:33:20 +01:00
Sema Checherinda
3b58249320
pack several files in one thread
2023-02-25 13:33:20 +01:00
Sema Checherinda
8abc1f0d5d
fix build and style
2023-02-25 13:33:20 +01:00
Sema Checherinda
dce319e1c5
add multitreading for StorageSystemDetachedParts
2023-02-25 13:33:20 +01:00
Alexander Gololobov
f8ce665a27
Merge pull request #46849 from ClickHouse/fix-bad-function-name
...
Fix wrong function name
2023-02-25 10:21:32 +01:00
Alexey Milovidov
10c2bfe2ee
Add a test
2023-02-25 09:08:24 +01:00
Alexey Milovidov
9ec6f94638
Add a test
2023-02-25 09:07:55 +01:00
Azat Khuzhin
f56eb86f7b
Fix 01520_client_print_query_id test
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-25 09:07:52 +01:00
Azat Khuzhin
5321a8183e
Fix 02116_interactive_hello test
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-25 09:04:54 +01:00
Alexey Milovidov
fbff23403f
Add a test
2023-02-25 08:53:53 +01:00
Alexey Milovidov
21ba6b70e6
Fix MSan report in Map data type
2023-02-25 08:47:48 +01:00
Alexey Milovidov
c659d84b47
Fix MSan report in Map data type
2023-02-25 08:46:21 +01:00
Alexey Milovidov
cde1bdad10
Spelling
2023-02-25 08:45:53 +01:00