Commit Graph

37885 Commits

Author SHA1 Message Date
AVMusorin
0f2ae72141
prohibit DEFAULT/EPHEMERAL/ALIAS in KafkaEngine 2023-03-03 16:25:42 +01:00
Alexey Milovidov
866c318c12
Merge pull request #46947 from ClickHouse/evillique-patch-1
Another fix for clone() for ASTColumnMatchers
2023-02-27 19:28:30 +03:00
Robert Schulze
6f0709032d
Merge pull request #46921 from ClickHouse/rs/inv-idx-checksum
A better alternative to #46344
2023-02-27 14:44:44 +01:00
Robert Schulze
5c8edcc2e7
Merge pull request #46940 from ClickHouse/rs/sizes-of-arrays-dont-match
Typo: SIZES_OF_ARRAYS_DOESNT_MATCH --> SIZES_OF_ARRAYS_DONT_MATCH
2023-02-27 14:33:09 +01:00
Kruglov Pavel
e9078b402b
Merge pull request #46742 from Avogar/update-settings
Enable input_format_json_ignore_unknown_keys_in_named_tuple by default
2023-02-27 14:30:28 +01:00
Robert Schulze
3880ac97af
Merge pull request #46875 from ClickHouse/rs/fix-incorrect-LIKE-to-substring-search-translation
Fix wrong results of some LIKE searches when the LIKE pattern contains quoted non-quotable characters
2023-02-27 12:34:07 +01:00
Nikolay Degterinsky
10c04d5a38
Fix clone() for ASTColumnMatchers 2023-02-27 12:26:36 +01:00
Sema Checherinda
29a0d766a0
Merge pull request #46886 from azat/async-metrics-intervals
Add new metrics to system.asynchronous_metrics
2023-02-27 11:25:38 +01:00
Vladimir C
6a4d0849f6
Merge pull request #46841 from azat/url-functions-fixes 2023-02-27 11:16:25 +01:00
Robert Schulze
4c9b9b362c
Replace dynamic_cast by typeid_cast 2023-02-27 10:01:21 +00:00
Robert Schulze
22d09caea2
SIZES_OF_ARRAYS_DOESN_MATCH --> SIZES_OF_ARRAYS_DONT_MATCH 2023-02-27 08:31:40 +00:00
Alexey Milovidov
cf4abcd988
Merge pull request #46915 from azat/tests/expect-fasttest
Fix some expect tests leftovers and enable them in fasttest
2023-02-27 07:34:29 +03:00
Alexey Milovidov
c32f579d67 Review from @tavplubix 2023-02-26 22:58:40 +01:00
Robert Schulze
cc0c0c6133
A better alternative to #46344
The (experimental) inverted index writes/reads files different from the
standard files written by the other skip indexes. The original problem
was that with database engine "ordinary", DROP TABLE of a table with
inverted index finds unknown files in persistence and complains. The
same will happen with engine "atomic" but deferred. As a hotfix, the
error was silenced by explicitly adding the four files created in a
specific test to the deletion code.

This PR tries a cleaner solution where all needed files are provided via
the normal checksum structure. One drawback remains which is that the
affected files were written earlier and we don't have their checksums
available. Therefore, the inverted index is currently excluded from
CHECK TABLE.

Minimal repro:
  SET allow_experimental_inverted_index = 1;
  DROP TABLE IF EXISTS tab;
  CREATE TABLE tab(s String, INDEX af(s) TYPE inverted(2)) ENGINE = MergeTree() ORDER BY s;
  INSERT INTO tab VALUES ('Alick a01');
  CHECK TABLE tab;
  DROP TABLE IF EXISTS tab;

  run ./clickhouse-test with --db-engine Ordinary
2023-02-26 21:06:38 +00:00
Alexey Milovidov
73aec86f5a Change exception message 2023-02-26 21:36:26 +01:00
Alexey Milovidov
df5c7c98e6
Merge pull request #46897 from ClickHouse/fix-fill-empty-block
Fix - WITH FILL would produce abort when FillingTransform processing empty block
2023-02-26 22:30:50 +03:00
Robert Schulze
f53d38cf85
Merge branch 'master' into rs/like-with-trailing-percentage 2023-02-26 14:43:27 +01:00
Azat Khuzhin
c8c8d4b42f Always bind Ctrl-T to reverse search (not only when skim is available)
This will avoid exceptions for fast tests

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-26 13:33:43 +01:00
Alexey Milovidov
d448a48f16
Merge pull request #46831 from azat/merge-default-prewhere
Allow PREWHERE for Merge with different DEFAULT expression for column
2023-02-26 10:02:34 +03:00
Robert Schulze
97f2778e34
Merge pull request #46889 from ClickHouse/rs/groupby-fuzz
Make ASTSelectQuery::formatImpl() more robust
2023-02-26 07:54:01 +01:00
Robert Schulze
5e68d50b39
Merge pull request #46752 from ClickHouse/rs/periods-in-kafka-topics
Allow configuration of Kafka topics with periods
2023-02-26 07:49:28 +01:00
Alexey Milovidov
8f40bbd5b4
Revert "Fix several RENAME COLUMN bugs." 2023-02-26 05:47:05 +03:00
Alexey Milovidov
3a3a2f352c
Merge pull request #46653 from aiven-sal/aiven-sal/and_opt_pr
ActionsDAG: do not change result of and() during optimization
2023-02-26 02:56:35 +03:00
Yakov Olkhovskiy
7b8d2d716e bypass empty blocks 2023-02-25 23:26:38 +00:00
Alexey Milovidov
6e4fc79639
Merge pull request #46609 from Algunenano/fix_recurring_alias
Fix incorrect alias recursion in QueryNormalizer
2023-02-26 02:03:17 +03:00
Alexey Milovidov
eb89ab471f
Merge pull request #45911 from ClickHouse/mutations_rename_hang
Fix several `RENAME COLUMN` bugs.
2023-02-26 01:56:40 +03:00
Alexey Milovidov
656af55831
Merge pull request #46384 from ClickHouse/fixes_for_993
Fixes for 993
2023-02-26 01:55:20 +03:00
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
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
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
Robert Schulze
15ece2ab16
Fix incorrect LIKE-to-substring translation
To be backported
2023-02-25 19:46:59 +00: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
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
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
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
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
Alexey Milovidov
f9faec7ba0 Do not backoff reading from URL in case of too many opened files 2023-02-25 03:21:34 +01:00
Alexey Milovidov
a712fc6435 Fix wrong function name 2023-02-25 00:27:54 +01:00
Alexey Milovidov
ae230e3a82
Update trap.cpp 2023-02-25 02:24:29 +03:00
Alexey Milovidov
e23d68bcba Fix MSan report in "maxIntersections" function 2023-02-25 00:14:32 +01:00