Commit Graph

132161 Commits

Author SHA1 Message Date
Amos Bird
18395a387c
Fix another unitest 2023-12-30 01:14:21 +08:00
Raúl Marín
5fb7f9f861 Ignore other numeric types for now 2023-12-29 18:09:20 +01:00
Kruglov Pavel
c03e36e012
Merge branch 'master' into better-parsing-exceptions 2023-12-29 18:07:32 +01:00
avogar
f20917048e Fix kafka tests 2023-12-29 17:02:46 +00:00
Alexander Tokmakov
790ededf80
Update BackupCoordinationStageSync.cpp 2023-12-29 17:58:24 +01:00
Azat Khuzhin
9a8b308a3d Correctly handle keys with dot in the name in configurations XMLs
For this I've added escape of the keys returned by keys() method, and
handle this escaping in get*() methods.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 17:30:23 +01:00
Raúl Marín
22ef5443bb Move findNumeric to .cpp 2023-12-29 17:22:06 +01:00
Raúl Marín
ed6b9703a1 More iota 2023-12-29 17:20:18 +01:00
Raúl Marín
4b7fcfbc75 Use iota in more places 2023-12-29 17:20:18 +01:00
Alexander Tokmakov
302ddeb6d0
Update BackupCoordinationStageSync.cpp 2023-12-29 17:08:13 +01:00
Kruglov Pavel
f57939096c
Merge branch 'master' into ignore-mv-with-dropped-target-table 2023-12-29 17:02:23 +01:00
Kruglov Pavel
a38b3b9a79
Fix test 2023-12-29 17:02:02 +01:00
Raúl Marín
db97a69989 Add perf tests with tuples 2023-12-29 17:00:01 +01:00
Nikolai Kochetov
5521e5d9b1 Refactor StorageHDFS and StorageFile virtual columns filtering 2023-12-29 15:58:01 +00:00
robot-ch-test-poll3
07ba672e37
Merge pull request #58142 from canhld94/final_less_compare
MergeTree FINAL to not compare rows from same non-L0 part
2023-12-29 16:47:14 +01:00
Azat Khuzhin
a12df35be4 Eliminate possible race between ALTER_METADATA and MERGE_PARTS
v2: move metadata version check after checking that the part is not covering part
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 16:46:10 +01:00
Azat Khuzhin
7efe413575 Add a test for ALTER_METADATA vs MERGE_PARTS race (CHECKSUM_DOESNT_MATCH)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 16:43:02 +01:00
Azat Khuzhin
c7fa93d704 Add infrastructure for testing replicated MergeTree queue
- replicated_queue_fail_next_entry - to fail next queue entry
- replicated_queue_unfail_entries - to "unfail" all queue entries (if
  any)

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 16:43:01 +01:00
Azat Khuzhin
4b1712f8e9 Fix replication.lib helper (system.mutations has database not current_database)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 16:24:57 +01:00
Alexander Tokmakov
1013f6b23f
Merge branch 'master' into reintroduce_is_deleted 2023-12-29 15:46:24 +01:00
Alexander Tokmakov
26f2ea308a
Update 02488_zero_copy_detached_parts_drop_table.sh 2023-12-29 15:42:40 +01:00
Alexander Tokmakov
72a0797b88 keep exception format string in retries ctl 2023-12-29 15:21:46 +01:00
Alexander Tokmakov
bfc10bd234 an option to avoid waiting for inactive Replicated db replicas 2023-12-29 15:19:16 +01:00
Alexey Milovidov
96876aa4f4
Merge pull request #58345 from ClickHouse/dos-windows
Add a style check against DOS and Windows
2023-12-29 15:02:46 +01:00
Alexey Milovidov
ea03cc82aa
Merge pull request #58320 from ClickHouse/mv3
Refreshable materialized views again
2023-12-29 14:44:50 +01:00
Raúl Marín
bda6104f84 Replace std::iota with DB::iota where possible 2023-12-29 14:38:22 +01:00
Azat Khuzhin
853fdfe775 Clean cached messages on destroy kafka consumer
The callchain of the kafka consumer is very tricky, so for the sake of
common sense let's just clean the messages on moving out consumer (and
in dtor, but this is just to keep that two code path in sync).

(Also reported by @filimonov)

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 14:30:21 +01:00
Alexey Milovidov
4843d5d099
Update check-style 2023-12-29 16:29:30 +03:00
Azat Khuzhin
b3d6caf37f Unsubscribe kafka consumer before cleaning it by TTL
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 14:03:53 +01:00
Azat Khuzhin
0d71bf1411 Upload time of the perf tests into artifacts as test_duration_ms
Now perf test changes/failures will have two rows, row for new and row
for old server.

I thought about uploading only the time of the test on the new server,
but because not all perf tests uploaded, you cannot always get the time
of the test without the changes (i.e. from run on the upstream/master
repo/branch).

<details>

Before:

```sql
SELECT
    concat(test, ' #', toString(query_index)),
    'slower' AS test_status,
    0 AS test_duration_ms,
    concat('https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.', test, '.', toString(query_index)) AS report_url
FROM queries
WHERE (changed_fail != 0) AND (diff > 0)
UNION ALL
SELECT
    concat(test, ' #', toString(query_index)),
    'unstable' AS test_status,
    0 AS test_duration_ms,
    concat('https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#unstable-queries.', test, '.', toString(query_index)) AS report_url
FROM queries
WHERE unstable_fail != 0

Query id: 49dfdc9a-f549-4499-9a1a-410e5053f6c1

┌─concat(test, ' #', toString(query_index))─┬─test_status─┬─test_duration_ms─┬─report_url─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ hashed_array_dictionary #16               │ slower      │                0 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.hashed_array_dictionary.16 │
│ ngram_distance #2                         │ slower      │                0 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.ngram_distance.2           │
│ ngram_distance #3                         │ slower      │                0 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.ngram_distance.3           │
│ ngram_distance #4                         │ slower      │                0 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.ngram_distance.4           │
└───────────────────────────────────────────┴─────────────┴──────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```

After:

```sql
SELECT
    concat(test, ' #', toString(query_index), '::', test_desc_.1) AS test_name,
    'slower' AS test_status,
    test_desc_.2 AS test_duration_ms,
    concat('https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.', test, '.', toString(query_index)) AS report_url
FROM queries
ARRAY JOIN map('old', left, 'new', right) AS test_desc_
WHERE (changed_fail != 0) AND (diff > 0)
UNION ALL
SELECT
    concat(test, ' #', toString(query_index), '::', test_desc_.1) AS test_name,
    'unstable' AS test_status,
    test_desc_.2 AS test_duration_ms,
    concat('https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#unstable-queries.', test, '.', toString(query_index)) AS report_url
FROM queries
ARRAY JOIN map('old', left, 'new', right) AS test_desc_
WHERE unstable_fail != 0

Query id: 20475bfd-754b-4159-aa16-7798f4720bf8

┌─test_name────────────────────────┬─test_status─┬─test_duration_ms─┬─report_url─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ hashed_array_dictionary #16::old │ slower      │           0.2149 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.hashed_array_dictionary.16 │
│ hashed_array_dictionary #16::new │ slower      │           0.2519 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.hashed_array_dictionary.16 │
│ ngram_distance #2::old           │ slower      │           0.3598 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.ngram_distance.2           │
│ ngram_distance #2::new           │ slower      │           0.4425 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.ngram_distance.2           │
│ ngram_distance #3::old           │ slower      │           0.3644 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.ngram_distance.3           │
│ ngram_distance #3::new           │ slower      │           0.4716 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.ngram_distance.3           │
│ ngram_distance #4::old           │ slower      │           0.3577 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.ngram_distance.4           │
│ ngram_distance #4::new           │ slower      │           0.4577 │ https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.ngram_distance.4           │
└──────────────────────────────────┴─────────────┴──────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```

</details>

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 13:48:41 +01:00
Raúl Marín
e692b0a5bd Move iota implementation to its own file 2023-12-29 13:47:33 +01:00
Amos Bird
0d801c4f6b
Fix unitest 2023-12-29 20:40:52 +08:00
Nikolai Kochetov
0e8232a8c3 Check what happen if remove array joined columns from KeyCondition 2023-12-29 12:24:19 +00:00
Azat Khuzhin
d899384ea1 Interpret binary without name as clickhouse-local
By "without name" I mean either of this:
- without arguments (except for the argv[0])
- or with arguments starts with dash

This should improve usability, and better ad of the clickhouse-local.

v2: clarify with comment
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 13:23:19 +01:00
Azat Khuzhin
f578541ded Fix destructing kafka consumer via member orders
We've discussed this with @filimonov and he pointed out that everything
else (except for rdkafka_stat/rdkafka_stat_mutex) is done via members
orders, so let's do it in the same style.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 13:19:11 +01:00
Raúl Marín
e2d0ca675f Merge remote-tracking branch 'blessed/master' into speedup_numbers 2023-12-29 13:15:39 +01:00
Alexey Milovidov
48a397577c Add a style check against DOS and Windows 2023-12-29 13:10:40 +01:00
Alexander Tokmakov
c4e46db3c0
Update 02488_zero_copy_detached_parts_drop_table.sh 2023-12-29 13:05:50 +01:00
Alexey Milovidov
09181b6c37
Merge pull request #58335 from lingtaolf/feature/sparkBar_alias_to_sparkbar
sparkBar as an alias to sparkbar
2023-12-29 13:02:55 +01:00
Raúl Marín
fd438cc5b6 Merge remote-tracking branch 'blessed/master' into minmax_non_numeric 2023-12-29 12:39:29 +01:00
Azat Khuzhin
9e6cfaf7d1 Interpret ch as clickhouse (instead of clickhouse-local)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 12:38:52 +01:00
Azat Khuzhin
9c8b5edc33 Add bash completion for ch/chl/chc
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 12:38:52 +01:00
Azat Khuzhin
8c54380d80 Avoid sending ComposeObject requests after upload to GCS
This should not be required anymore, but leave it as an option, since
likely this is required for old files.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 11:53:49 +01:00
Azat Khuzhin
f4a7789cd4 Convert various S3::Client settings into separate ClientSettings struct
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 11:53:49 +01:00
Azat Khuzhin
2b2d10689b Make S3::Client::ComposeObject private
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-29 11:53:49 +01:00
Nikolai Kochetov
062168c177 Fix a test. 2023-12-29 09:38:10 +00:00
Duc Canh Le
91a87d6b6c better implementation
Signed-off-by: Duc Canh Le <duccanh.le@ahrefs.com>
2023-12-29 07:27:10 +00:00
Amos Bird
6b6e40831c
Move symbols from src/* into namespace DB 2023-12-29 14:37:08 +08:00
Bharat Nallan Chakravarthy
1dce048b58 initial refactor of db registration 2023-12-28 18:59:45 -08:00
凌涛
57c57360db add doc 2023-12-29 10:43:11 +08:00