Commit Graph

11771 Commits

Author SHA1 Message Date
Alexander Gololobov
b629833ef9 Test cases to check that row level filter is applied before prewhere actions are executed 2022-06-22 17:23:09 +02:00
Alexander Gololobov
935c9e454f Test case for no columns read in row level filter 2022-06-22 17:23:09 +02:00
kssenii
0acc95fe22 Review fixes 2022-06-22 16:55:47 +02:00
Nikita Taranov
41ba0118b5
Bring back #36396 (#38110)
* Revert "Revert "More parallel execution for queries with `FINAL` (#36396)""

This reverts commit 5bfb15262c.

* fix tests

* fix review suggestions

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-22 15:05:07 +02:00
Azat Khuzhin
9eeb856519 Fix INSERT into Distributed hung due to ProfileEvents
Right now RemoteInserter does not read ProfileEvents for INSERT, it
handles them only after sending the query or on finish.

But #37391 sends them for each INSERT block, but sometimes they can be
no ProfileEvents packet, since it sends only non-empty blocks.

And this adds too much complexity, and anyway ProfileEvents are useless
for the server, so let's send them only if the query is initial (i.e.
send by user).

Note, that it is okay to change the logic of sending ProfileEvents w/o
changing DBMS_TCP_PROTOCOL_VERSION, because there were no public
releases with the original patch included yet.

Fixes: #37391
Refs: #35075
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-22 15:41:15 +03:00
Alexander Tokmakov
31c4f83469
Merge pull request #38272 from ClickHouse/create_empty_as_select
Support CREATE ... EMPTY AS SELECT
2022-06-22 13:25:12 +03:00
alesapin
d3bc7c0190
Merge pull request #37971 from Avogar/fix-alter-columns-with-dots
Fix ALTER column with column names with dots
2022-06-22 12:20:30 +02:00
Alexander Tokmakov
1ca8f83b21
Update 02305_schema_inference_with_globs.sh 2022-06-22 12:33:12 +03:00
Alexey Milovidov
5855668514 Remove trash 2022-06-22 06:23:35 +02:00
Alexey Milovidov
da578ec890
Merge pull request #38204 from ClickHouse/enable-enable_positional_arguments
Enable `enable_positional_arguments`
2022-06-22 07:12:08 +03:00
Anton Popov
d5d568e235
Merge pull request #37913 from azat/parts-refcnt
Fix refcnt for unused MergeTree parts in SELECT queries
2022-06-21 22:56:26 +02:00
Alexander Tokmakov
8288b9fe60 fixes 2022-06-21 18:47:55 +02:00
Alexander Tokmakov
f3ea8ad745 support CREATE EMPTY AS SELECT 2022-06-21 15:03:58 +02:00
kssenii
4656dd3de3 Headers for url in ast 2022-06-21 14:25:05 +02:00
alesapin
cbec924113
Merge pull request #37932 from azat/tests-fix-log_comment
tests: fix log_comment (extra quotes)
2022-06-21 13:38:35 +02:00
Kruglov Pavel
3c5a627bd7
Merge pull request #38239 from CurtizJ/fix-reading-from-s3
Fix reading from s3 in some corner cases
2022-06-21 12:57:55 +02:00
mergify[bot]
f304fc9179
Merge branch 'master' into fix-alter-columns-with-dots 2022-06-21 10:40:53 +00:00
mergify[bot]
bb79eb73e6
Merge branch 'master' into fix-short-circuit 2022-06-21 10:40:07 +00:00
Kruglov Pavel
b9b58b4305
Merge pull request #37759 from Avogar/fix-nothing-error
Fix possible logical error with type Nothing in some functions
2022-06-21 12:35:05 +02:00
Nikolai Kochetov
b8d27aa8dd
Merge pull request #37469 from azat/projections-optimize_aggregation_in_order
Implement in order aggregation (optimize_aggregation_in_order) for projections for tables with fully materialized projections
2022-06-21 12:17:35 +02:00
Saulius Valatka
0dc7854af1 add initial io_uring support 2022-06-21 09:59:46 +03:00
Alexander Tokmakov
75b8800b5c
Merge pull request #37822 from ClickHouse/fix_flaky_tests_with_transactions
Try fix flaky tests with transactions
2022-06-21 09:38:25 +03:00
Maksim Kita
cb018348cf
Merge pull request #38022 from kitaisreal/sorting-added-batch-queue-variants
Sorting added batch queue variants
2022-06-20 22:35:44 +02:00
zvonand
ad2b9cc4e4 upd tests 2022-06-20 23:38:45 +05:00
mergify[bot]
9bdd9e14a6
Merge branch 'master' into fix_flaky_tests_with_transactions 2022-06-20 18:11:30 +00:00
Dmitry Novik
f6692c34e6
Merge pull request #34632 from excitoon-favorites/optimizedprocessing
Optimized processing of ORDER BY in window functions
2022-06-20 20:03:26 +02:00
Anton Popov
5b439d4117 add test 2022-06-20 16:08:43 +00:00
Alexander Tokmakov
0fa1fc66c4
Update 02232_dist_insert_send_logs_level_hung.sh 2022-06-20 18:55:17 +03:00
mergify[bot]
b440ee84ae
Merge branch 'master' into fix-short-circuit 2022-06-20 15:14:19 +00:00
Dmitry Novik
77177917bd
Merge pull request #37848 from ClickHouse/window-function-expression
Support expressions with window functions
2022-06-20 14:21:13 +02:00
Vitaly Baranov
06c4082a7c
Merge pull request #37358 from vitlibar/backup-improvements-6
Backup Improvements 6
2022-06-20 14:13:30 +02:00
Ilya Yatsishin
24d5be1669
Merge pull request #38212 from azat/no-stress
tests: disable 01646_system_restart_replicas_smoke under stress tests
2022-06-20 12:54:32 +02:00
mergify[bot]
4ed606a275
Merge branch 'master' into fix_flaky_tests_with_transactions 2022-06-20 10:17:51 +00:00
Kseniia Sumarokova
a756b4be27
Merge pull request #37391 from azat/insert-profile-events-fix
Send profile events for INSERT queries (previously only SELECT was supported)
2022-06-20 12:16:29 +02:00
Kseniia Sumarokova
c83594284d
Merge pull request #38205 from azat/fix-window-view
(Window View is an experimental feature) Fix LOGICAL_ERROR for WINDOW VIEW with incorrect structure
2022-06-20 11:47:45 +02:00
Azat Khuzhin
3678870abf tests: disable 01646_system_restart_replicas_smoke under stress tests
This test executes SYSTEM RESTART REPLICAS, that may leave some tables
in some tests, and the problem test is
01414_mutations_and_errors_zookeeper, that has invalid values in the
table that produces the following error:

    2022.06.19 19:02:07.165320 [ 1242562 ] {} <Error> MutateFromLogEntryTask: virtual bool DB::ReplicatedMergeMutateTaskBase::executeStep(): Code: 6. DB::Exception: Cannot parse string 'Hello' as UInt64: syntax error at begin of string. Note: there are toUInt64OrZero and toUInt64OrNull functions, which returns zero/NULL instead of throwing exception.: while executing 'FUNCTION _CAST(value :: 2, 'UInt64' :: 3) -> _CAST(value, 'UInt64') UInt64 : 4': (while reading from part /var/lib/clickhouse/store/700/70043200-eae1-44da-8554-0d43b7e936d7/20191002_1_1_0/): While executing MergeTreeInOrder. (CANNOT_PARSE_TEXT), Stack trace (when copying this message, always include the lines below):

Here is part of the server log that relevant for the test:

    ...
    2022.06.19 18:33:22.495867 [ 391343 ] {e0332447-5473-4653-ba8b-b976acb304a1} <Trace> InterpreterSystemQuery: Restarting replica on test_9.replicated_mutation_table
    2022.06.19 18:33:22.503462 [ 390869 ] {} <Information> test_9.replicated_mutation_table (70043200-eae1-44da-8554-0d43b7e936d7): Stopped being leader
    ...
    2022.06.19 18:33:23.396760 [ 395825 ] {09ee374d-a8d9-47db-bdca-611d605b40c6} <Error> executeQuery: Code: 341. DB::Exception: Mutation is not finished because table shutdown was called. It will be done after table restart. (UNFINISHED) (version 22.6.1.1985 (official build)) (from [::1]:40558) (comment: '01414_mutations_and_errors_zookeeper.sh') (in query: ALTER TABLE replicated_mutation_table MODIFY COLUMN value UInt64 SETTINGS replication_alter_partitions_sync = 2), Stack trace (when copying this message, always include the lines below):
    ...
    2022.06.19 18:33:23.467115 [ 390869 ] {} <Debug> test_9.replicated_mutation_table (70043200-eae1-44da-8554-0d43b7e936d7): Loading data parts
    2022.06.19 18:33:23.471062 [ 390869 ] {} <Debug> test_9.replicated_mutation_table (70043200-eae1-44da-8554-0d43b7e936d7): Loaded data parts (3 items)
    ...
    2022.06.19 18:33:23.515997 [ 390869 ] {} <Trace> test_9.replicated_mutation_table (ReplicatedMergeTreeRestartingThread): Restarting thread finished
    ...
    2022.06.19 18:33:23.522475 [ 390869 ] {} <Trace> test_9.replicated_mutation_table (PartMovesBetweenShardsOrchestrator): PartMovesBetweenShardsOrchestrator thread finished
    ...
    2022.06.19 18:33:24.960630 [ 391343 ] {e0332447-5473-4653-ba8b-b976acb304a1} <Error> executeQuery: Code: 57. DB::Exception: Cannot attach table with UUID 9b62c1d4-cf4a-4e41-bd11-bafb1446495c, because it was detached but still used by some query. Retry later. (TABLE_ALREADY_EXISTS) (version 22.6.1.1985 (official build)) (from [::1]:47448) (comment: 01646_system_restart_replicas_smoke.sql) (in query: SYSTEM RESTART REPLICAS;), Stack trace (when copying this message, always include the lines below):
    ...
    2022.06.19 18:33:24.490940 [ 400623 ] {00c29852-e786-4e53-a44a-5f1c5f23c698} <Debug> executeQuery: (from [::1]:48804) (comment: '01414_mutations_and_errors_zookeeper.sh') SELECT distinct(value) FROM replicated_mutation_table ORDER BY value (stage: Complete)
    2022.06.19 18:33:24.502168 [ 400623 ] {00c29852-e786-4e53-a44a-5f1c5f23c698} <Error> executeQuery: Code: 60. DB::Exception: Table test_9.replicated_mutation_table doesn't exist. (UNKNOWN_TABLE) (version 22.6.1.1985 (official build)) (from [::1]:48804) (comment: '01414_mutations_and_errors_zookeeper.sh') (in query: SELECT distinct(value) FROM replicated_mutation_table ORDER BY value), Stack trace (when copying this message, always include the lines below):
    ...
    2022.06.19 18:33:25.048152 [ 395940 ] {bb31a17f-aca1-411a-ab30-c6b7598c59e5} <Debug> executeQuery: (from [::1]:49236) (comment: '01414_mutations_and_errors_zookeeper.sh') DROP TABLE IF EXISTS replicated_mutation_table (stage: Complete)

And if this table will be left, then checking error messages in
/var/log/clickhouse-server/clickhouse-server.backward.clean.log will
fail, like in [1].

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/38205/90b57e7445d5167ea2170bfe03af29faffc195cf/stress_test__undefined__actions_.html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-20 08:03:22 +03:00
Azat Khuzhin
bb20cfb303 tests: drop IF EXISTS for DROP in 01414_mutations_and_errors_zookeeper
This will make troubleshooting easier.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-20 07:58:01 +03:00
Vladimir Chebotarev
ea156fe679 Fixed long test. 2022-06-20 05:15:08 +03:00
Vladimir Chebotarev
3fc1916f35 Fixed test. 2022-06-20 05:15:08 +03:00
Vladimir Chebotarev
43791473e2 Probably fixed tests. 2022-06-20 05:15:08 +03:00
Vladimir Chebotarev
7df45e13e9 Lengthened the test. 2022-06-20 05:15:08 +03:00
Vladimir Chebotarev
fd805b0a46 Added more tests. 2022-06-20 05:15:08 +03:00
Vladimir Chebotarev
3f7fe7fd83 Simple test. 2022-06-20 05:15:07 +03:00
Vitaly Baranov
2c8788266c Fix tests. 2022-06-20 03:44:49 +02:00
Alexey Milovidov
c77ba3ec7e Fix tests 2022-06-20 00:45:22 +02:00
mergify[bot]
670a63865e
Merge branch 'master' into window-function-expression 2022-06-19 22:14:54 +00:00
zvonand
832fd6e0a9 Added tests + minor updates 2022-06-19 23:10:28 +05:00
Alexey Milovidov
f024956f62 Merge branch 'master' of github.com:ClickHouse/ClickHouse into revert-35914-FIPS_compliance 2022-06-19 18:59:53 +02:00
Alexey Milovidov
7700c26076
Merge pull request #38196 from ClickHouse/revert-38194-revert-37015-zstd_window_log_max
Revert "Revert "Add a setting to use more memory for zstd decompression""
2022-06-19 19:58:03 +03:00
Alexey Milovidov
c941d0c8e2
Merge pull request #33653 from ClickHouse/enable-some-settings
Enable some settings
2022-06-19 19:52:56 +03:00
Alexey Milovidov
354a10d1e1
Merge pull request #35075 from azat/dist-insert-hung-fix
Disable send_logs_level for INSERT into Distributed to avoid possible hung
2022-06-19 19:39:56 +03:00
Azat Khuzhin
bc3e73d776 Fix LOGICAL_ERROR for WINDOW VIEW with incorrect structure
Caching header of the source table in the WINDOW VIEW should not be
done, since there is no ability to get notification when it had been
changed (ALTER or CREATE/DROP).

And this fires on [CI], when the following tests had been executed in
order in stress tests:
- 01050_window_view_parser_tumble (leaves wm for mt)
- 01748_partition_id_pruning (cache input_header)
- 01188_attach_table_from_path (insert into mt with wm attached and
  incorrect structure)

  [CI]: https://s3.amazonaws.com/clickhouse-test-reports/38056/109980eb275c064d08bc031bfdc14d95b9a7272b/stress_test__undefined__actions_.html

Follow-up for: #37965 (@Vxider)
Fixes: #37815
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-19 19:16:39 +03:00
alesapin
b97b1422c9
Merge pull request #38195 from azat/tests-fix-bc-check
tests: add no-backward-compatibility-check for 02067_lost_part_s3
2022-06-19 13:42:59 +02:00
Alexey Milovidov
0cf88e0950
Revert "ClickHouse's boringssl module updated to the official version of the FIPS compliant." 2022-06-18 23:16:18 +03:00
Alexey Milovidov
67a66721f2 Merge branch 'master' into enable-some-settings 2022-06-18 19:16:23 +02:00
Alexey Milovidov
88afbe5742 Fix bad test 2022-06-18 19:12:19 +02:00
Maksim Kita
ace900a1f8 Fixed tests 2022-06-18 18:20:01 +02:00
Maksim Kita
33f4b4d834 Fixed tests 2022-06-18 18:20:01 +02:00
Maksim Kita
ef084ad12a Fixed tests 2022-06-18 18:20:00 +02:00
Alexey Milovidov
73709b0488
Revert "Revert "Add a setting to use more memory for zstd decompression"" 2022-06-18 15:55:35 +03:00
Antonio Andelic
dd75e9cba5
Merge pull request #38149 from vdimir/multiple_joins_original_names_34697
Add setting multiple_joins_try_to_keep_original_names
2022-06-18 14:47:31 +02:00
alesapin
0ae0cc54aa
Merge pull request #38106 from ClickHouse/tsan_less_flaky_tests
Some fixes for tests with tsan
2022-06-18 14:22:43 +02:00
Azat Khuzhin
cb552bc582 tests: add no-backward-compatibility-check for 02067_lost_part_s3
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-18 15:12:07 +03:00
alesapin
16e8b85fbf
Revert "Add a setting to use more memory for zstd decompression" 2022-06-18 14:08:14 +02:00
Alexey Milovidov
344e407f2e
Merge pull request #36914 from azat/tests-randomize
Randomize settings related to in-order read/aggregation
2022-06-18 04:21:30 +03:00
Alexey Milovidov
e20259e9ca
Merge pull request #37015 from wuxiaobai24/zstd_window_log_max
Add a setting to use more memory for zstd decompression
2022-06-18 04:19:27 +03:00
Alexey Milovidov
c107a58c11
Update 02293_test_zstd_window_log_max.sh 2022-06-18 04:18:08 +03:00
Dmitry Novik
c7c5b08948 Update test 2022-06-17 16:44:41 +00:00
Alexander Tokmakov
e9c2157f01 Merge branch 'master' into fix_flaky_tests_with_transactions 2022-06-17 15:57:30 +02:00
Alexander Tokmakov
828946ccf5
Update 02320_mapped_array_witn_const_nullable.sql 2022-06-17 16:44:52 +03:00
avogar
23f48a9fb9 Fix bug with nested short-circuit functions 2022-06-17 11:44:49 +00:00
Maksim Kita
77c519ae08
Merge pull request #38142 from kitaisreal/executable-user-defined-functions-parameters-direct-fix
Disable parameters for non direct executable user defined functions
2022-06-17 12:57:27 +02:00
Alexander Tokmakov
299f102ccf
Update 02316_cast_to_ip_address_default_column.sql 2022-06-17 12:36:05 +03:00
Igor Nikonov
baebbc084f
Merge pull request #38027 from ClickHouse/decimal_rounding_fix
Fix: rounding for Decimal128/Decimal256 with more than 19-digits long scale
2022-06-17 09:48:18 +02:00
Alexander Gololobov
59d32f8c96
Merge pull request #38132 from Avogar/fix-mapped-array
Fix logical error in array mapped functions with const nullable column
2022-06-17 08:49:41 +02:00
vdimir
15988a220b
Add test multiple_joins_original_names 2022-06-16 16:00:33 +00:00
Maksim Kita
aff66742e7 Disable parameters for non direct executable user defined functions 2022-06-16 16:29:04 +02:00
Dmitry Novik
4d3ff7ee5e Add more tests with window expressions 2022-06-16 13:40:12 +00:00
Anton Popov
13ec7e3092
Merge pull request #37978 from CurtizJ/fix-sparse-s3
Fix reading of sparse columns from s3
2022-06-16 15:32:54 +02:00
Dmitry Novik
0663f07e67 Rework expressions with window functions 2022-06-16 13:29:56 +00:00
mergify[bot]
f46f7257dd
Merge branch 'master' into fix-nothing-error 2022-06-16 10:58:03 +00:00
mergify[bot]
2557e8ad51
Merge branch 'master' into decimal_rounding_fix 2022-06-16 10:53:49 +00:00
avogar
a3a7cc7a5d Fix logical error in array mapped functions with const nullable column 2022-06-16 10:41:53 +00:00
Alexander Tokmakov
ca649da97f better comments 2022-06-16 12:12:44 +02:00
Azat Khuzhin
b3bf7589ef Fix possible concurrent access in ProgressIndication
In case of all of the above:
- clickhouse-local
- input_format_parallel_parsing=true
- write_progress_on_update=true

It is possible concurrent access to the following:
- writeProgress() (class properties) (guarded with progress_mutex)
- thread_data/host_cpu_usage (guarded with profile_events_mutex)

v2: decrease number of rows for INSERT ProfileEvents test (10 times)
    CI: https://s3.amazonaws.com/clickhouse-test-reports/37391/4bd5c335182279dcc5020aa081b13c3044135951/stateless_tests__debug__actions__[1/3].html
v3: decrease number of rows for INSERT ProfileEvents test (10 times) and add a comment
    CI: https://s3.amazonaws.com/clickhouse-test-reports/37391/026d7f732cb166c90d6c287b02824b6c7fdebf0c/stateless_tests_flaky_check__address__actions_/runlog.log
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>

f
2022-06-16 11:59:01 +03:00
Azat Khuzhin
4baa7690ae Send profile events for INSERT queries (previously only SELECT was supported)
Reproducer:

    echo "1" | clickhouse-client --query="insert into function null('foo String') format TSV" --print-profile-events --profile-events-delay-ms=-1

However, clickhouse-local is differnt, it does sent the periodically,
but only if query was long enough, i.e.:

    # yes | head -n100000 | clickhouse-local --query="insert into function null('foo String') format TSV" --print-profile-events --profile-events-delay-ms=-1
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] ContextLock: 10 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] DiskReadElapsedMicroseconds: 29 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] IOBufferAllocBytes: 200000 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] IOBufferAllocs: 1 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] InsertQuery: 1 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] InsertedBytes: 1000000 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] InsertedRows: 100000 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] MemoryTrackerUsage: 1521975 (gauge)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] OSCPUVirtualTimeMicroseconds: 102148 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] OSReadChars: 135700 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] OSWriteChars: 8 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] Query: 1 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] RWLockAcquiredReadLocks: 2 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] ReadBufferFromFileDescriptorRead: 5 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] ReadBufferFromFileDescriptorReadBytes: 134464 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] RealTimeMicroseconds: 293747 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] SoftPageFaults: 382 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] TableFunctionExecute: 1 (increment)
    [s1.ch] 2022.05.20 15:20:27 [ 0 ] UserTimeMicroseconds: 102148 (increment)

v2: Proper support ProfileEvents in INSERTs (with protocol change)
v3: Receive profile events on INSERT queries
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-16 11:59:01 +03:00
Azat Khuzhin
3e833b403d tests: fix expectations for 00172_early_constant_folding
After AggregatingStep is used, there is not StrictResize processor,
since there is only one stream.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-16 09:58:36 +03:00
Azat Khuzhin
4ff82eb9d5 Implement optimize_aggregation_in_order for projections
v2: use real column name instead of aliases from GROUP BY
    Fixes the following error in 01710_projection_aggregation_in_order:

        Not found column a in block. There are only columns: toStartOfHour(ts), sum(value). (NOT_FOUND_COLUMN_IN_BLOCK)
v2.1: Get back support for projected and non-projected parts
v2.2: merge tests and rename
v3: Reduce copy-paste for optimize_aggregation_in_order for projections
v4: rebase on top of QueryPlanResourceHolder
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-16 09:58:36 +03:00
mergify[bot]
0167b90cf9
Merge branch 'master' into tests-randomize 2022-06-16 06:04:58 +00:00
mergify[bot]
ff9f4af28c
Merge branch 'master' into enable-some-settings 2022-06-16 03:51:59 +00:00
Azat Khuzhin
d85421cc70 tests: fix log_comment (extra quotes)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
Cherry-pick: 9a297ce3b6
2022-06-15 23:52:49 +03:00
Alexander Tokmakov
5e2b42c85a Merge branch 'master' into fix_flaky_tests_with_transactions 2022-06-15 20:47:02 +02:00
Daniel Kutenin
a769dea8ef
Merge branch 'ClickHouse:master' into master 2022-06-15 19:12:10 +01:00
Alexander Tokmakov
9cac78b498 make tests with tsan less flaky 2022-06-15 19:54:46 +02:00
Alexey Milovidov
7baa54f92f
Merge pull request #37697 from zvonand/dt64-neg-subseconds
Fix DateTime64 negative fractional seconds
2022-06-15 19:30:42 +03:00
Danila Kutenin
048f56bf4d Fix some tests and comments 2022-06-15 14:40:21 +00:00
Alexander Tokmakov
5bfb15262c Revert "More parallel execution for queries with FINAL (#36396)"
This reverts commit c8afeafe0e.
2022-06-15 17:25:38 +03:00
Yakov Olkhovskiy
e604d31feb
Merge pull request #38074 from ClickHouse/bug-with-fill-extra
Inconsistency in ORDER BY ... WITH FILL feature.
2022-06-15 08:19:55 -04:00
mergify[bot]
d704264fae
Merge branch 'master' into decimal_rounding_fix 2022-06-15 10:47:09 +00:00
Nikita Taranov
c8afeafe0e
More parallel execution for queries with FINAL (#36396) 2022-06-15 12:44:20 +02:00
Robert Schulze
9794098ebb
Merge pull request #37553 from koloshmet/fpc_codec
FPC Codec for floating point data
2022-06-15 12:03:41 +02:00
Alexander Tokmakov
dcfe4eea3c
Update 01417_freeze_partition_verbose.sh 2022-06-15 12:53:53 +03:00
Yakov Olkhovskiy
411695bd97 do not fill 'to' boundary 2022-06-14 22:26:50 -04:00
mergify[bot]
12bd2c0e3f
Merge branch 'master' into dt64-neg-subseconds 2022-06-15 02:24:17 +00:00
Alexey Milovidov
ab9fc572d5
Merge pull request #37667 from ClickHouse/group-by-enum-fix
Support types with non-standard defaults in ROLLUP, CUBE, GROUPING SETS
2022-06-15 05:14:33 +03:00
Alexey Milovidov
5e9e5a4eaf
Merge pull request #37525 from Avogar/avro-structs
Support Maps and Records, allow to insert null as default in Avro format
2022-06-15 00:04:29 +03:00
Igor Nikonov
94116a1ee0 Decimal128/256 rouding tests 2022-06-14 18:03:05 +00:00
Azat Khuzhin
109980eb27 Fix "Missing columns" for GLOBAL JOIN with CTE w/o alias
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-14 17:22:07 +03:00
Alexander Tokmakov
b39bd3c4e0 fix 2022-06-14 16:11:16 +02:00
Alexander Tokmakov
86c8d0ad4d Merge branch 'master' into fix_flaky_tests_with_transactions 2022-06-14 12:07:03 +02:00
Antonio Andelic
dded528d13
Merge pull request #36424 from PolyProgrammist/r1unfreeze
SYSTEM UNFREEZE query that deletes the whole backup
2022-06-14 08:44:45 +02:00
Dmitry Novik
eddd4ecaeb Allow several functions in window expression 2022-06-14 00:57:33 +00:00
Dmitry Novik
5d2f1b7a2d Update test 2022-06-13 23:11:53 +00:00
Anton Popov
e6517164f2 add test and comment 2022-06-13 17:30:58 +00:00
Antonio Andelic
b9cf6fe367 Merge branch 'master' into pp-system-unfreeze 2022-06-13 14:46:30 +00:00
Anton Popov
cf47b1c96e
Merge pull request #37305 from CurtizJ/dynamic-columns-15
Fix some cases of insertion nested arrays to columns of type Object
2022-06-13 14:28:36 +02:00
Azat Khuzhin
7210be1534 Disable send_logs_level for INSERT into Distributed to avoid possible hung
In case of INSERT into Distributed table with send_logs_level!=none it
is possible to receive tons of Log packets, and w/o consuming it
properly the socket buffer will be full, and eventually the query will
hung.

This happens because receiver will not read data until it will send logs
packets, but sender does not reads those Log packets and so receiver
hung, and hence the sender will hung too, because receiver do not
consume Data packets anymore.

In the initial version of this patch I tried to properly consume Log
packets, but it is not possible to ensure that before writing Data
blocks all Log packets had been consumed, that said that with current
protocol implementation it is not possible to fix Log packets consuming
properly, to avoid deadlock, so send_logs_level had been simply
disabled.

But note, that this does not differs to the user, in what ClickHouse did
before, since before it simply does not consume those packets, so the
client does not saw those messages anyway.

<details>

The receiver:

    Poco::Net::SocketImpl::poll(Poco::Timespan const&, int)
    Poco::Net::SocketImpl::sendBytes(void const*, int, int)
    Poco::Net::StreamSocketImpl::sendBytes(void const*, int, int)
    DB::WriteBufferFromPocoSocket::nextImpl()
    DB::TCPHandler::sendLogData(DB::Block const&)
    DB::TCPHandler::sendLogs()
    DB::TCPHandler::readDataNext()
    DB::TCPHandler::processInsertQuery()

    State      Recv-Q  Send-Q          Local Address:Port         Peer Address:Port Process
    ESTAB      4331792 211637           127.0.0.1:9000            127.0.0.1:24446 users:(("clickhouse-serv",pid=46874,fd=3850))

The sender:

    Poco::Net::SocketImpl::poll(Poco::Timespan const&, int)
    Poco::Net::SocketImpl::sendBytes(void const*, int, int)
    Poco::Net::StreamSocketImpl::sendBytes(void const*, int, int)
    DB::WriteBufferFromPocoSocket::nextImpl()
    DB::WriteBuffer::write(char const*, unsigned long)
    DB::CompressedWriteBuffer::nextImpl()
    DB::WriteBuffer::write(char const*, unsigned long)
    DB::SerializationString::serializeBinaryBulk(DB::IColumn const&, DB::WriteBuffer&, unsigned long, unsigned long) const
    DB::NativeWriter::write(DB::Block const&)
    DB::Connection::sendData(DB::Block const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool)
    DB::RemoteInserter::write(DB::Block)
    DB::RemoteSink::consume(DB::Chunk)
    DB::SinkToStorage::onConsume(DB::Chunk)

    State      Recv-Q  Send-Q         Local Address:Port         Peer Address:Port Process
    ESTAB      67883   3008240           127.0.0.1:24446           127.0.0.1:9000  users:(("clickhouse-serv",pid=41610,fd=25))

</details>

v2: rebase to use clickhouse_client_timeout and add clickhouse_test_wait_queries
v3: use KILL QUERY
v4: adjust the test
v5: disable send_logs_level for INSERT into Distributed
v6: add no-backward-compatibility-check tag
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-13 13:44:33 +03:00
Robert Schulze
9ec56fa362
Merge pull request #37628 from zvonand/non-neg-deriv
Non Negative Derivative window function
2022-06-13 11:21:16 +02:00
Mikhail Guzov
092a00d95a
Merge branch 'ClickHouse:master' into fpc_codec 2022-06-11 21:24:06 +03:00
Kseniia Sumarokova
a4e080d144
Merge pull request #37965 from Vxider/wv-add-missing-default
Add missing default columns when pushing to target table in WindowView
2022-06-11 13:38:08 +02:00
Yakov Olkhovskiy
8f6fee76fb
Merge pull request #37959 from ClickHouse/bug-with-fill-inconsistency
Preserve filling step plan position on sorting optimization
2022-06-10 12:58:59 -04:00
mergify[bot]
9e0d16f21d
Merge branch 'master' into window-function-expression 2022-06-10 15:31:53 +00:00
zvonand
5beb6e0c3b Merge branch 'master' of github.com:ClickHouse/ClickHouse into non-neg-deriv 2022-06-10 17:40:16 +03:00
Kseniia Sumarokova
580a30c6ae
Merge pull request #37859 from KinderRiven/support_max_request_cache_size
Support to set max cache size for per query in local cache
2022-06-10 16:17:18 +02:00
zvonand
794dbe6b60 new stateless queries + minor fixes 2022-06-10 17:01:49 +03:00
Anton Popov
5b1583c06a Merge remote-tracking branch 'upstream/master' into HEAD 2022-06-10 13:48:52 +00:00
avogar
a4f378f8c3 Fix ALTER column with column names with dots 2022-06-10 08:58:00 +00:00
Vxider
b09dbeed77 support default columns 2022-06-10 07:24:26 +00:00
Yakov Olkhovskiy
5a08ebd213 test is added 2022-06-09 13:51:50 -04:00
Maksim Kita
0c1211eb61
Merge pull request #37930 from kitaisreal/function-dict-get-check-arguments-size
Function dictGet check arguments size
2022-06-08 23:25:14 +02:00
Maksim Kita
b7152fa2bf Function dictGet check arguments size 2022-06-08 17:19:30 +02:00
Vadim Volodin
637d293fbd Add SYSTEM UNFREEZE query 2022-06-08 15:21:14 +03:00
Maksim Kita
7d1a43cfeb Fix setting cast_ipv4_ipv6_default_on_conversion_error for internal cast 2022-06-08 12:43:39 +02:00
alesapin
a16cf7e77e
Merge pull request #37892 from azat/mv-tests-overlaps
Fix stress hung because of attached MV with sleep()
2022-06-08 12:42:13 +02:00
Maksim Kita
4e160105b9
Merge pull request #37805 from kitaisreal/dictionaries-hierarchy-nullable-key-support
Hierarchical dictinaries support nullable parent key
2022-06-08 12:36:09 +02:00
KinderRiven
6c76be9db1 fix config 2022-06-08 16:11:12 +08:00
KinderRiven
e0819f346a fix test 2022-06-08 16:04:47 +08:00
KinderRiven
b853f6e68c fix unit_test 2022-06-08 14:19:59 +08:00
Azat Khuzhin
61a2613127 Fix refcnt for unused MergeTree parts in SELECT queries
Before this patch SELECT queries hold parts even if they were not
required by select (had been eliminated by partition pruning).

This defers removing parts if you have long running queries.

This had been introduced in #23932, with introduction of
StorageSnapshotPtr.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-08 07:04:53 +03:00
KinderRiven
83452756bd add stateless test 2022-06-08 02:05:48 +08:00
Dmitry Novik
a3d70f27f4
Merge pull request #36944 from excitoon-favorites/better_exp_smooth
Fix for exponential time decaying window functions
2022-06-07 17:20:43 +02:00
avogar
5e6c2d4b08 Add test 2022-06-07 14:17:14 +00:00
mergify[bot]
e1b9281a91
Merge branch 'master' into fix-nothing-error 2022-06-07 13:39:46 +00:00
Nikita Mikhaylov
85a1204e95
Do not calculate integrals in statistical tests (#36953) 2022-06-07 15:39:39 +02:00
Yakov Olkhovskiy
17fbf49d13
Merge pull request #37765 from ClickHouse/bug-0leading-int
Number's parser refactoring, no octal support
2022-06-07 07:24:42 -04:00
mergify[bot]
014d9e2144
Merge branch 'master' into fix-nothing-error 2022-06-07 11:24:28 +00:00
avogar
cbd50aecd4 Fix 2022-06-07 11:23:59 +00:00
Anton Popov
ef6f5a6500
Merge pull request #37570 from azat/column-ttl-expired-fix
Do not write expired columns by TTL after subsequent merges
2022-06-07 13:05:03 +02:00
Kseniia Sumarokova
c4b1f537cd
Merge pull request #37879 from Vxider/wv-inner-target-drop
Do not drop the inner target table when alter WindowView
2022-06-07 13:00:15 +02:00
Kseniia Sumarokova
edc6b68801
Merge pull request #37853 from Vxider/fire-when-inserted
Fire and clean windows in WindowView only when data is inserted
2022-06-07 11:24:50 +02:00