Commit Graph

137687 Commits

Author SHA1 Message Date
johnnymatthews
b3cfb8a2cb Adds sleep function docs. 2024-03-12 13:57:03 -03:00
johnnymatthews
53442f4914 Cleans up markdown. 2024-03-12 13:48:47 -03:00
Anton Popov
ccc6df0e43 fix aggregate function uniqExact 2024-03-12 16:48:19 +00:00
robot-ch-test-poll
14e560a191
Merge pull request #61252 from peter279k/fix_import_gpg_key
Using straightforward approach to import GPG key
2024-03-12 17:36:06 +01:00
Kruglov Pavel
e1ea0671b1
Disable test 02998_primary_key_skip_columns.sql in sanitizer builds as it can be slow 2024-03-12 17:27:25 +01:00
Azat Khuzhin
e7d02654a7 Fix 02265_column_ttl (filter out NO_REPLICA_HAS_PART errors)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-12 17:09:02 +01:00
Azat Khuzhin
f71cc5d706 Fix 02943_rmt_alter_metadata_merge_checksum_mismatch (filter out NO_REPLICA_HAS_PART errors)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-12 17:08:42 +01:00
Azat Khuzhin
fb0ad3eb15 Disable retries for replicated fetches (they are handled by the engine itself)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-12 17:08:42 +01:00
Azat Khuzhin
df44ed173c Fix missed entries in system.part_log in case of fetch preferred over merges/mutations
The NEED_PREPARE do not call part_log_writer() before.

v2:
- Add a test for missed entries in system.part_log for merge
- Fix part_log_writer
- Add a test for missed entries in system.part_log for mutate

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-12 17:08:42 +01:00
Mikhail f. Shiryaev
2fbc113021
Adjust the packages in installation docs 2024-03-12 17:00:44 +01:00
Yarik Briukhovetskyi
858ad2d688
beautify and change max_value 2024-03-12 16:39:10 +01:00
avogar
07ee777c8d Restart CI 2024-03-12 15:39:04 +00:00
Nikita Taranov
24f4cda484 impl 2024-03-12 15:34:07 +00:00
Peter
5576c17051
Using straightforward approach to import GPG key 2024-03-12 22:57:06 +08:00
yariks5s
01d0fba085 init 2024-03-12 14:48:59 +00:00
Mikhail Koviazin
94f15dd5e0
Fix has() function with Nullable column
Previous implementation didn't check for `null_map` when the given
argument was not `Null`. This commit adds the missing check.

Fixes #60214
2024-03-12 16:48:43 +02:00
avogar
0b588480f5 Fix lazy execution in dictGetOrDefault for RangeHashedDictionary 2024-03-12 14:34:15 +00:00
Nikita Mikhaylov
19b1a675a1
Merge pull request #61173 from Avogar/avoid-logical-error-in-json
Avoid some logical errors in experimantal Object type
2024-03-12 15:14:32 +01:00
Kseniia Sumarokova
44dc42e11f
Merge branch 'master' into revive-cache-contention-fix 2024-03-12 15:07:39 +01:00
János Benjamin Antal
b5489ac962 Print out all queries to have better insights 2024-03-12 14:05:39 +00:00
Alexey Milovidov
c27c1e1035 Fix build 2024-03-12 14:36:07 +01:00
Raúl Marín
c011901d01 Fix coverage 2024-03-12 14:28:28 +01:00
Mikhail f. Shiryaev
50aab0b69f
Fix annoying typo 2024-03-12 14:06:17 +01:00
Max K
46e9880fcc
Merge pull request #61214 from ClickHouse/ci_fix_perf_test_arm_runner
CI: fix runner for arm perf tests
2024-03-12 14:05:54 +01:00
Robert Schulze
1b1685e3f1
Merge remote-tracking branch 'rschu1ze/master' into clang-tidy-list 2024-03-12 13:02:59 +00:00
Raúl Marín
9603b2a8c6 Merge remote-tracking branch 'blessed/master' into test_san 2024-03-12 13:26:55 +01:00
János Benjamin Antal
f63970769b Make test less flaky 2024-03-12 12:23:09 +00:00
Mikhail f. Shiryaev
612ff3c5bc
Make every style-checker runner types scaling-out very quickly 2024-03-12 13:00:31 +01:00
robot-clickhouse
e9ef18c3ac Automatic style fix 2024-03-12 11:54:56 +00:00
Kruglov Pavel
2e803f29f8
Fix KeeperSnapshotManagerS3 2024-03-12 12:45:02 +01:00
Kruglov Pavel
d431276045
Fix usage of session_token in S3 2024-03-12 12:43:48 +01:00
János Benjamin Antal
aa9b5741e1 Improve tests 2024-03-12 11:43:08 +00:00
Antonio Andelic
c1cefe1874 Fix keeper reconfig for standalone binary 2024-03-12 11:41:36 +00:00
Kseniia Sumarokova
59dc34ea69
Merge branch 'master' into revive-cache-contention-fix 2024-03-12 12:39:25 +01:00
Azat Khuzhin
b11b732e43 Add a test from #60046
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-12 12:32:19 +01:00
Azat Khuzhin
8bbd0298b1 Allow to share const columns in GROUP BY keys
Fixes:

    select toNullable(os_name) AS os_name, count() from (SELECT CAST('iphone' AS Enum8('iphone' = 1, 'android' = 2)) AS os_name) group by os_name WITH TOTALS settings allow_experimental_analyzer=1
    Code: 10. DB::Exception: Received from localhost:9000. DB::Exception: Not found column __table1.os_name:  in block toNullable(__table1.os_name) Nullable(Enum8('iphone' = 1, 'android' = 2)) Nullable(size = 0, Int8(size = 0), UInt8(size = 0)), count() UInt64 UInt64(size = 0). (NOT_FOUND_COLUMN_IN_BLOCK)

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-12 12:32:19 +01:00
Azat Khuzhin
d9c4972de4 Update tests references for GROUP BY const WITH TOTAL under analyzer
Now it preserves the original header in case of GROUP BY const, though
not for remote queries.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-12 12:32:19 +01:00
Azat Khuzhin
f9dcef774a Fix function execution over const and LowCardinality with GROUP BY const for analyzer
Consider the following example:

    SELECT concatWithSeparator('|', 'a', concatWithSeparator('|', CAST('x', 'LowCardinality(String)'))) GROUP BY 'a'

Under analyzer it fails, UBsan report:

    ==15121==WARNING: MemorySanitizer: use-of-uninitialized-value
      ...
      8 0x5555601880ed in void DB::FormatStringImpl::format<true, false>() /src/ch/clickhouse/src/Functions/formatString.h:125:21
      9 0x55556017aeb8 in void DB::FormatStringImpl::formatExecute<>() /src/ch/clickhouse/src/Functions/formatString.h:30:13
      10 0x555560196779 in DB::()::ConcatWithSeparatorImpl<>::executeImpl() const /src/ch/clickhouse/src/Functions/concatWithSeparator.cpp:151:9
      11 0x55555a2ad5b7 in DB::FunctionToExecutableFunctionAdaptor::executeImpl() const /src/ch/clickhouse/src/Functions/IFunctionAdaptor.h:21:26
      12 0x555584312297 in DB::IExecutableFunction::executeWithoutLowCardinalityColumns() const /src/ch/clickhouse/src/Functions/IFunction.cpp:249:15
      13 0x555584317640 in DB::IExecutableFunction::executeWithoutSparseColumns() const /src/ch/clickhouse/src/Functions/IFunction.cpp:283:24
      14 0x55558431bf5c in DB::IExecutableFunction::execute() const /src/ch/clickhouse/src/Functions/IFunction.cpp:380:16
      15 0x555587bf3e20 in DB::executeAction() /src/ch/clickhouse/src/Interpreters/ExpressionActions.cpp:613:60

    Uninitialized value was created by a heap allocation
      ...
      6 0x55558b1c1a05 in DB::ColumnString::reserve(unsigned long) /src/ch/clickhouse/src/Columns/ColumnString.cpp:494:13
      7 0x55558980095d in DB::prepareOutputBlockColumns() /src/ch/clickhouse/src/Interpreters/AggregationUtils.cpp:32:25

The problem is that during query analysis
(QueryAnalyzer::resolveFunction()), the return value of the function had
been executed as LowCardinality(String), but the 'a' argument that is
passed to the concatWithSeparator() is not-const, because it had been
reused from the GROUP BY step, and this causes UB, since column 'a' does
not have enough rows (it should have 2 rows, since LowCardinality always
contains the default, while it has only 1).

v2: fix GROUPING SETs
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-12 12:32:19 +01:00
robot-clickhouse
4ce5245157 Automatic style fix 2024-03-12 11:03:39 +00:00
Raúl Marín
faed53d0c7 Merge remote-tracking branch 'blessed/master' into groupArrayCrash 2024-03-12 12:02:34 +01:00
Raúl Marín
a65ac96b04
Merge pull request #61147 from azat/ci/fix-symbolizer
Fix llvm symbolizer on CI
2024-03-12 12:01:43 +01:00
Kseniia Sumarokova
6425610d4c
Merge pull request #61174 from ClickHouse/kssenii-patch-9
Update ReadSettings.h
2024-03-12 12:00:05 +01:00
Kseniia Sumarokova
61543edc8b
Merge branch 'master' into fix-usage-of-plain-metadata 2024-03-12 11:53:00 +01:00
Raúl Marín
c9c73378eb Fix problem detected by ubsan 2024-03-12 11:52:17 +01:00
Kseniia Sumarokova
49fb94d34b
Merge branch 'master' into kssenii-patch-9 2024-03-12 11:49:02 +01:00
alesapin
40a992e1db
Merge pull request #61132 from ClickHouse/more_memory_checks
Throw memory limit exceptions to avoid OOM in some places
2024-03-12 11:48:15 +01:00
alesapin
ed22c4c86e
Merge pull request #61136 from azat/tests/fix-test_distributed_directory_monitor_split_batch_on_failure
Fix test_distributed_directory_monitor_split_batch_on_failure flakienss
2024-03-12 11:39:04 +01:00
Han Fei
74bdd2a17d
Merge pull request #61183 from hanfei1991/hanfei/fix_02949_ttl_group_by_bug
fix flaky 02949_ttl_group_by_bug
2024-03-12 11:19:01 +01:00
vdimir
439fe42f88
Merge pull request #61013 from ClickHouse/vdimir/fix_astrename_clone
Fix ASTRenameQuery::clone
2024-03-12 11:13:28 +01:00
Azat Khuzhin
c78a029d15
tests: fix typo in 01603_insert_select_too_many_parts.sql
Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com>
2024-03-12 11:12:27 +01:00