Commit Graph

109336 Commits

Author SHA1 Message Date
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
Pradeep Chhetri
389803ca62
Merge branch 'master' into pchhetri/fix-query-in-stress 2023-02-27 11:27:16 +08:00
Pradeep Chhetri
c8dcea9539
Merge branch 'master' into pchhetri/add-grace-hash-stress 2023-02-27 11:26:48 +08:00
Alexey Milovidov
a649311fa1
Merge pull request #46922 from ClickHouse/review-tavplubix
Code review from @tavplubix
2023-02-27 05:15:43 +03:00
Duc Canh Le
eba00f5094
Merge branch 'master' into ch_fix_aggregate_arithmetic 2023-02-27 09:44:40 +08:00
Nikolay Degterinsky
a4434a3125
Merge pull request #46924 from den-crane/patch-65
Doc. asterisk_include_materialized_columns / asterisk_include_alias_columns
2023-02-27 01:49:37 +01:00
Denny Crane
fd97f7ad0a
Update settings.md 2023-02-26 19:25:13 -04:00
Alexey Milovidov
e047646c6b
Merge pull request #46917 from ClickHouse/rs/better-syntaxexception
Make SyntaxExceptions easier to understand
2023-02-27 01:01:32 +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
1afbf49a63
Merge pull request #46832 from HarryLeeIBM/hlee-s390x-xz
Fix http xz compression issue for s390x
2023-02-26 22:31:57 +03: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
db3fbc871c
Merge pull request #46803 from ClickHouse/rs/cmake-too-old-arm
CMake: Add best effort checks that the build machine isn't too old
2023-02-26 20:28:53 +01:00
Robert Schulze
61706dfa53
Merge pull request #46869 from ClickHouse/rs/like-with-trailing-percentage
Small optimization of LIKE patterns with > 1 trailing %
2023-02-26 20:14:21 +01:00
robot-clickhouse
5f7220e498 Automatic style fix 2023-02-26 18:15:55 +00:00
Smita Kulkarni
4c5d39725c Updated node to check BACKUP_CREATED to node1 in test_concurrent_backups_on_different_nodes 2023-02-26 19:08:26 +01:00
Smita Kulkarni
10c92b6cb0 Increased ddl timeout during DROP of table and updated node for concurrent backups on different node 2023-02-26 19:06:31 +01:00
Azat Khuzhin
92dde41e2a Fix 01180_client_syntax_errors flakiness
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-26 18:27:51 +01:00
Azat Khuzhin
e83efb590b Fix few more expect tests
- remove helpers to simplify them
- use CLICKHOUSE_TMP for uniq name [1]
  [1]: https://s3.amazonaws.com/clickhouse-test-reports/46915/c8c8d4b42f277f223ae2a866389b35a9bc58e876/stateless_tests__aarch64_/run.log
- use more unique string to make this test really test something

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-26 16:48:36 +01:00
Robert Schulze
b20ac16d08
Slightly easier to read SyntaxExceptions
E.g. exception text for input '2 ':

- before:
  Syntax error: Not a valid integer: 2

- now:
  Syntax error: Not a valid integer: '2 '
2023-02-26 15:17:28 +00:00
Maksim Kita
046846d087 Added tests 2023-02-26 14:45:02 +01:00
Robert Schulze
f53d38cf85
Merge branch 'master' into rs/like-with-trailing-percentage 2023-02-26 14:43:27 +01:00
Maksim Kita
8ad016dbe6 Map field to string fix 2023-02-26 13:38:45 +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
Sema Checherinda
1666527dae do listing combined with getting size in one thread 2023-02-26 12:09:05 +01:00
Azat Khuzhin
584f9d5e8f Fix 02160_client_autocomplete_parse_query
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-26 12:04:50 +01:00
Azat Khuzhin
05b50a1964 Remove long/no-fasttest for some expect tests
Those tests was simply broken and timed out without failing the test
before this PRs:
- #46911
- #46857
- #46779, #46636, #46619

So after those fixes they should be fast and fasttest compatible.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-26 12:00:36 +01:00
Alexey Milovidov
b5438456aa
Merge pull request #46911 from azat/tests/fix-02116_interactive_hello
tests: fix 02116_interactive_hello for "official build"
2023-02-26 11:37:34 +03:00
Alexey Milovidov
9ac48dddb8
Merge pull request #46888 from vitlibar/fix-test_async_backups_to_same_destination
Fix test test_async_backups_to_same_destination.
2023-02-26 11:36:18 +03: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
Azat Khuzhin
cb4d665c02 tests: fix 02116_interactive_hello for "official build"
Example of such greeting:

    2023-02-26 15:26:33 expect: does "\u001b[0J\u001b[?25hClickHouse client version 23.3.1.207 (official build).\r\nConnecting to database test_i4r0kozg at localhost:9000 as user default.\r\nConnected to ClickHouse server version 23.3.1 revision 54461.\r\n\r\nWarnings:\r\n * Server logging level is set to 'test' and performance is degraded. This cannot be used in production.\r\n * Linux is not using a fast clock source. Performance can be degraded. Check /sys/devices/system/clocksource/clocksource0/current_clocksource\r\n * The setting 'allow_remote_fs_zero_copy_replication' is enabled for MergeTree tables. But the feature of 'zero-copy replication' is under development and is not ready for production. The usage of this feature can lead to data corruption and loss. The setting should be disabled in production.\r\n * Table system.session_log is enabled. It's unreliable and may contain garbage. Do not use it for any kind of security monitoring.\r\n\r\n\u001b[?2004h\u001b[1Gfunctional-tests :) " (spawn_id exp4) match regular expression "ClickHouse client version [\d]{2}.[\d]{1,2}.[\d]{1,2}.[\d]{1,}.\r"? Gate "ClickHouse client version *\r"? gate=yes re=no

CI: https://s3.amazonaws.com/clickhouse-test-reports/0/df1e18ad4cb9b08240273169ca7dd6ca1cac617c/stateless_tests__aarch64_/run.log
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-26 07:35:38 +01:00
Alexey Milovidov
df1e18ad4c
Merge pull request #46909 from ClickHouse/revert-45911-mutations_rename_hang
Revert "Fix several `RENAME COLUMN` bugs."
2023-02-26 05:47:48 +03:00
Alexey Milovidov
8f40bbd5b4
Revert "Fix several RENAME COLUMN bugs." 2023-02-26 05:47:05 +03:00
Yakov Olkhovskiy
dd25d8955e test is added 2023-02-26 02:30:54 +00:00
Alexey Milovidov
936f57e7b2
Merge pull request #46887 from ClickHouse/fix-flaky-test-12
Fix flaky `test_concurrent_queries_restriction_by_query_kind`
2023-02-26 04:30:51 +03:00
Alexey Milovidov
2472eeaefd
Update 02575_merge_prewhere_materialized.sql 2023-02-26 02:58:32 +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
Rich Raposa
bb51da7de1
Merge pull request #46805 from den-crane/patch-63
Doc. Final setting
2023-02-25 16:05:54 -07: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
Vitaly Baranov
2d38c89e2a Fix test test_async_backups_to_same_destination. 2023-02-25 23:38:40 +01: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
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