Commit Graph

639 Commits

Author SHA1 Message Date
Dmitry Novik
290f4109e1
Merge pull request #59986 from azat/analyzer/fix-group-by-const
Fix function execution over const and LowCardinality with GROUP BY const for analyzer
2024-03-19 15:20:17 +01:00
vdimir
e27e6fb2f5
Analyzer: support join using column from select list 2024-03-18 11:11:00 +00:00
Alexey Milovidov
01136bbc3b Limit backtracking in parser 2024-03-17 19:54:45 +01:00
avogar
9b6a5df20d Merge commit 'a3373ab580804545bafc9db64e10c95b067f6ecb' of github.com:ClickHouse/ClickHouse into revert-61200-revert-60430-max-parallel-replicas-validate 2024-03-15 15:13:41 +00:00
Dmitry Novik
1cdd280c9f
Merge pull request #61392 from ClickHouse/analyzer-fix-context-in-merge
Analyzer: Fix planner context for subquery in StorageMerge
2024-03-15 14:05:28 +01:00
Dmitry Novik
0b3b734c9b Analyzer: Fix planner context for subquery in StorageMerge 2024-03-14 17:37:49 +01:00
Nikolai Kochetov
48ec419b9d
Merge pull request #61286 from ClickHouse/fix-test_build_sets_from_multiple_threads-analyzer
Fixing test_build_sets_from_multiple_threads/test.py::test_set
2024-03-14 16:28:37 +01:00
Nikolai Kochetov
8fdf3ae747 Add a comment. 2024-03-14 12:31:30 +00:00
Nikolai Kochetov
51ccb520fb Change only ignore_limits setting 2024-03-13 15:54:06 +00:00
Nikolai Kochetov
ef796c668d Fixing test_build_sets_from_multiple_threads/test.py::test_set 2024-03-13 12:03:37 +00:00
Alexey Milovidov
c2506b0344
Merge pull request #61171 from Algunenano/compilation
Remove a few templates from Aggregator.cpp
2024-03-13 10:24:06 +03: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
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
Raúl Marín
3cc07603ff Merge remote-tracking branch 'blessed/master' into compilation 2024-03-11 22:53:55 +01:00
Kruglov Pavel
5608005b34
Revert "Revert "Don't allow to set max_parallel_replicas to 0 as it doesn't make sense"" 2024-03-11 21:22:45 +01:00
Kruglov Pavel
a90a6e9a27
Revert "Don't allow to set max_parallel_replicas to 0 as it doesn't make sense" 2024-03-11 21:05:44 +01:00
Kruglov Pavel
1c1336bdc0
Merge pull request #60430 from Avogar/max-parallel-replicas-validate
Don't allow to set max_parallel_replicas to 0 as it doesn't make sense
2024-03-11 18:04:54 +01:00
Raúl Marín
9bada70f45 Remove a bunch of transitive dependencies 2024-03-11 14:52:32 +01:00
Dmitry Novik
526af77f4a
Merge pull request #60313 from ClickHouse/analyzer-refactor-constant-name
Analyzer: Refactor execution name for ConstantNode
2024-03-08 12:08:05 +01:00
Nikolai Kochetov
76bca1a743 Merge branch 'master' into allow-subqueries-for-in-parallel-replicas 2024-03-07 14:14:16 +00:00
Nikolai Kochetov
cd4b60b51a Rename the setting 2024-03-07 13:38:00 +00:00
Dmitry Novik
d92538ced2
Merge branch 'master' into analyzer-refactor-constant-name 2024-03-06 17:55:52 +01:00
Nikolai Kochetov
2730f0b54f Allow subqueries for IN with parallel replicas under a setting. 2024-03-06 16:48:03 +00:00
Dmitry Novik
5524f5901f Cleanup code 2024-03-05 16:18:03 +01:00
Dmitry Novik
9c5ed092f8 Fix CREATE VIEW with scalar subquery #ci_set_analyzer 2024-03-04 14:15:07 +01:00
Dmitry Novik
01829450fb Merge remote-tracking branch 'origin/master' into analyzer-refactor-constant-name 2024-03-04 14:12:15 +01:00
vdimir
47aa33408b
Resubmit "Analyzer: compute ALIAS columns right after reading"
This reverts commit 8141e1c3d1, reversing
changes made to fb099bbd62.
2024-03-01 14:53:02 +00:00
Alexander Tokmakov
2dedfd6cf9
Revert "Analyzer: compute ALIAS columns right after reading" 2024-02-29 14:22:07 +01:00
vdimir
5dd81f38fb
Merge pull request #59595 from ClickHouse/vdimir/analyzer/comute_alias_columns
Analyzer: compute ALIAS columns right after reading
2024-02-29 10:28:31 +01:00
avogar
929d83d46f Merge branch 'master' of github.com:ClickHouse/ClickHouse into max-parallel-replicas-validate 2024-02-28 12:31:46 +00:00
Dmitry Novik
33ae650e6a Merge remote-tracking branch 'origin/master' into analyzer-refactor-constant-name 2024-02-27 16:35:28 +01:00
Alexey Milovidov
c192a448d0 Update to clang-19 2024-02-27 14:37:21 +01:00
avogar
ac4af6a4ad Don't allow to set max_parallel_replicas to 0 as it doesn't make sense 2024-02-26 19:58:49 +00:00
vdimir
9f1a0734a1
review fix 2024-02-26 16:15:14 +00:00
vdimir
5a9026f39b
Analyzer: compute ALIAS columns right after reading 2024-02-26 16:15:05 +00:00
Dmitry Novik
42b91201a5 Merge remote-tracking branch 'origin/master' into analyzer-refactor-constant-name 2024-02-26 15:11:57 +00:00
Nikolai Kochetov
2197f2fc73
Try to cleanup a bit. 2024-02-26 02:32:00 +08:00
Amos Bird
534da3f40f
Fix more tests 2024-02-26 02:31:59 +08:00
Amos Bird
6a2eb7297d
Fix 2024-02-26 02:31:59 +08:00
Amos Bird
207d36d7c1
Make it work 2024-02-26 02:31:58 +08:00
Amos Bird
12914d2268
Fix 2024-02-26 02:31:58 +08:00
Amos Bird
6137914604
Fix most tests 2024-02-26 02:31:58 +08:00
Amos Bird
7435568a0d
Fix tests 2024-02-26 02:31:57 +08:00
Amos Bird
c5e073320c
Unify prewhere optimization 2024-02-26 02:31:56 +08:00
Amos Bird
07a0adceb9
Only use query_info.filter_actions_dag for key analysis 2024-02-26 02:31:55 +08:00
Dmitry Novik
601c3c33bc Set correct execution name for ConstantNode 2024-02-22 17:44:41 +01:00
Raúl Marín
b71bdbae1b Treat 2+ in allow_experimental_parallel_reading_from_replicas as 2 2024-02-21 15:33:37 +01:00
vdimir
6249e8da3f
Analyzer: fix row level filters with PREWHERE + additional filters 2024-02-20 11:56:25 +00:00
Dmitry Novik
11970ddf82
Merge branch 'master' into analyzer-fix-test_select_table_name_from_merge_over_distributed 2024-02-19 14:07:58 +01:00
Dmitry Novik
2122454576 Temporary progress 2024-02-19 12:41:29 +00:00
Dmitry Novik
8d2ad5383b Fix execution name for constants 2024-02-14 15:19:08 +00:00
Nikolai Kochetov
d697c12a44 Fixing build. 2024-02-13 17:57:35 +00:00
Nikolai Kochetov
c2ad7693db Review fixes. 2024-02-13 17:32:24 +00:00
Nikolai Kochetov
666b3d6664
Merge branch 'master' into allow-parallel-replicas-for-join-with-analyzer-2 2024-02-13 11:11:03 +01:00
Nikolai Kochetov
87b6d65b9b Remove outdated comment. 2024-02-12 13:46:30 +00:00
Dmitry Novik
b8f74b5b05
Merge pull request #50894 from ClickHouse/storage-merge-aliases-analyzer
Analyzer: support aliases and distributed JOINs in StorageMerge
2024-02-08 11:22:00 +01:00
Nikolai Kochetov
01d0ca315e
Merge branch 'master' into allow-parallel-replicas-for-join-with-analyzer-2 2024-02-07 17:56:57 +01:00
vdimir
9438118745
fix test_select_access_rights/test_main.py::test_select_join 2024-02-06 16:15:04 +00:00
vdimir
aad9f49626
analyzer fix test_select_access_rights/test_main.py::test_select_count 2024-02-06 16:01:26 +00:00
Nikolai Kochetov
29908ddd09 Remove commented code. Add more comments. 2024-02-06 15:59:13 +00:00
Nikolai Kochetov
6b06fcf7fc Fix more tests. 2024-02-05 17:54:15 +00:00
Nikolai Kochetov
15bf263153 Support non global in mode. 2024-02-05 17:05:21 +00:00
Nikolai Kochetov
7f2a5d38c5 Prohibit any inner join. 2024-02-05 17:05:20 +00:00
Nikolai Kochetov
b60228af3f Allow to send a chain of subqueries for parallel replicas with analyzer. 2024-02-05 17:05:20 +00:00
Dmitry Novik
722f3db738 Merge remote-tracking branch 'origin/master' into storage-merge-aliases-analyzer 2024-01-30 19:50:01 +00:00
Maksim Kita
5bb734a4bb ActionsDAG buildFilterActionsDAG refactoring 2024-01-25 18:24:14 +03:00
Maksim Kita
2a327107b6 Updated implementation 2024-01-25 14:31:49 +03:00
Nikolai Kochetov
65c5ea31a8
Revert "Revert "Allow parallel replicas for JOIN with analyzer [part 1]."" 2024-01-22 17:09:34 +01:00
Alexander Tokmakov
4315d44517
Revert "Allow parallel replicas for JOIN with analyzer [part 1]." 2024-01-22 13:30:35 +01:00
jsc0218
6f3124acdb
Merge pull request #58402 from zhangyifan27/add_max_estimated_execution_time
Seperate max_execution_time and max_estimated_execution_time
2024-01-21 19:57:06 -05:00
Igor Nikonov
4be068c73b
Merge pull request #58993 from ClickHouse/revert-58992-revert_flaky
Revive: Parallel replicas custom key: skip unavailable replicas
2024-01-20 19:44:56 +01:00
Nikita Taranov
bbf25b9cb9
Merge pull request #58996 from nickitat/fix_02404_with_analyzer
Fix 02404_memory_bound_merging with analyzer (follow up #56419)
2024-01-20 18:39:07 +01:00
Nikita Taranov
0cafb58c47 impl 2024-01-19 14:17:50 +01:00
Igor Nikonov
131f71b50a
Revert "Revert flaky" 2024-01-19 13:51:30 +01:00
Raúl Marín
477489a05d Revert "Merge pull request #57235 from ClickHouse/pr-custom-key-failover"
This reverts commit 8ba9b4a7ef, reversing
changes made to 0f39245cb8.
2024-01-19 12:46:05 +00:00
zhangyifan27
7e56a2d925 fix test failure when allow_experimental_analyzer=1 2024-01-19 16:11:30 +08:00
Nikolai Kochetov
733ceaa775 Allow parallel replicas for JOIN with analyzer. 2024-01-15 18:48:12 +00:00
Nikita Mikhaylov
8edab24189
Add comments to all columns of system tables (#58356) 2024-01-12 16:39:22 +01:00
Dmitry Novik
3b1d728683
Merge pull request #58739 from ClickHouse/fix-parallel-diff-window
Fix stream partitioning in parallel window functions
2024-01-12 16:36:53 +01:00
Dmitry Novik
91f4b20e02
Fix comments 2024-01-12 09:42:41 +01:00
Dmitry Novik
322d9478b0 Fix stream partitioning in parallel window functions 2024-01-12 08:32:34 +00:00
Igor Nikonov
8d4a395afa Merge remote-tracking branch 'origin/master' into pr-custom-key-failover 2024-01-10 20:28:04 +00:00
Dmitry Novik
11280cbde1 Merge remote-tracking branch 'origin/master' into storage-merge-aliases-analyzer 2024-01-09 15:10:59 +00:00
Igor Nikonov
7fd851b4e9 Merge remote-tracking branch 'origin/master' into pr-custom-key-failover 2024-01-08 20:43:20 +00:00
Anton Popov
8c9cf394b3 Merge remote-tracking branch 'upstream/master' into HEAD 2024-01-06 20:58:17 +00:00
Anton Popov
f252412915 Merge remote-tracking branch 'upstream/master' into HEAD 2024-01-06 03:08:52 +00:00
Nikolai Kochetov
7cfb2e1b44
Merge branch 'master' into analyzer-execution-names 2024-01-05 11:47:30 +01:00
Nikolai Kochetov
84b566d1a8
Merge pull request #58317 from ClickHouse/analyzer-using-func-arg
Analyzer: support functional arguments in USING clause
2024-01-05 10:43:42 +01:00
Nikolai Kochetov
80c1e59d3f Merge branch 'master' into analyzer-execution-names 2024-01-05 09:31:25 +00:00
Dmitry Novik
39b15f9130
Add a comment 2024-01-04 16:33:52 +01:00
Maksim Kita
8573c66b09 Fixed code review issues 2024-01-04 15:29:25 +03:00
Maksim Kita
b5997e6a96 MergeTreePrefetchedReadPool disable for LIMIT only queries 2024-01-04 15:06:38 +03:00
Anton Popov
ce1b978a2d Merge remote-tracking branch 'upstream/master' into HEAD 2024-01-03 16:01:44 +00:00
Anton Popov
7dd128f90f Revert "remove projection from StorageSnapshot"
This reverts commit a01acf5d2a.
2024-01-03 16:00:50 +00:00
Dmitry Novik
5308e24b8c Another fixup + reference update 2024-01-03 14:12:56 +00:00
Dmitry Novik
1c3364046e Fixup 2024-01-03 13:54:17 +00:00
Dmitry Novik
76f58fb49e Add a comment 2024-01-03 11:17:24 +00:00
Dmitry Novik
cb4d571a45 Support ALIAS columns in USING clause 2024-01-03 11:14:19 +00:00
Alexey Milovidov
7ee8708fa6 Remove useless headers 2024-01-01 19:29:51 +01:00
Igor Nikonov
208a9193f6 Merge remote-tracking branch 'origin/master' into pr-custom-key-failover 2023-12-28 21:28:36 +00:00
Alexey Milovidov
f00337e2ba
Merge pull request #57872 from CurtizJ/optimize-aggregation-consecutive-keys
Better optimization of consecutive keys in aggregation
2023-12-27 15:44:22 +01:00
Igor Nikonov
bee15325fc Merge remote-tracking branch 'origin/master' into pr-custom-key-failover 2023-12-26 21:56:46 +00:00
Azat Khuzhin
3be3b0a280 Fix incorrect Exceptions
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-24 21:26:32 +01:00
Igor Nikonov
d3a0869119 Merge remote-tracking branch 'origin/master' into parallel-replicas-in-subquery 2023-12-22 17:54:45 +00:00
Nikolai Kochetov
3cbd895ce1
Merge pull request #57827 from ClickHouse/vdimir/merge_join_array_lowcard
Fix low-cardinality keys support in MergeJoin
2023-12-22 13:34:06 +01:00
Yarik Briukhovetskyi
483a377834
Merge pull request #57995 from yariks5s/paste_join
Implementing PASTE JOIN
2023-12-22 12:56:06 +01:00
Igor Nikonov
81b8507cc1 New analyzer support 2023-12-21 17:04:03 +00:00
Igor Nikonov
db87ea0b86 Merge remote-tracking branch 'origin/master' into pr-custom-key-failover 2023-12-20 20:48:51 +00:00
Nikita Mikhaylov
cb6c9557ff
Merge branch 'master' into remove-old-projections-code 2023-12-20 17:45:38 +01:00
Alexey Milovidov
d190866fc0
Merge pull request #58031 from ClickHouse/revert-57766-fix-bug-window-functions
Revert "Fix bug window functions: revert #39631"
2023-12-20 01:08:08 +01:00
Raúl Marín
ccff198265
Rename canUseParallelReplicas to canUseTaskBasedParallelReplicas (#58025) 2023-12-19 23:21:19 +01:00
Yarik Briukhovetskyi
6e816d45ae
Merge branch 'master' into paste_join 2023-12-19 20:02:24 +01:00
yariks5s
4e418a89d9 fixed suggestions 2023-12-19 19:00:37 +00:00
Nikolai Kochetov
8ab6564538
Revert "Fix bug window functions: revert #39631" 2023-12-19 13:30:59 +01:00
Anton Popov
10bc2db56d add setting 2023-12-18 13:57:07 +00:00
Igor Nikonov
52db759c92 Merge remote-tracking branch 'origin/master' into pr-custom-key-failover 2023-12-18 11:59:13 +00:00
Alexey Milovidov
ae003bcc43
Merge pull request #57414 from Algunenano/i48496
Add tests for #48496
2023-12-17 20:51:25 +01:00
Nikolai Kochetov
8daa8e509a Try recreate context for IN subqueries. 2023-12-15 21:42:20 +00:00
Nikolai Kochetov
2f9537b7e0 Keep alias for clonned dummy tables. 2023-12-15 18:12:59 +00:00
Nikolai Kochetov
5c1ed3e2c2 Fix additional filters. 2023-12-15 13:00:10 +00:00
vdimir
0473e39352
lowcard in join output 2023-12-14 15:28:19 +00:00
Nikolai Kochetov
80e9d7c45f Fix another case., 2023-12-14 14:51:38 +00:00
Nikolai Kochetov
676b913a92 Keep old actions. 2023-12-14 13:52:56 +00:00
Nikolai Kochetov
8c2fa32a5a Keep old actions 2023-12-14 13:04:47 +00:00
Igor Nikonov
72f1c415f1 Merge remote-tracking branch 'origin/master' into pr-custom-key-failover 2023-12-13 15:03:05 +00:00
Nikolai Kochetov
093431be99 Fix some tests. 2023-12-13 14:21:42 +00:00
Nikolai Kochetov
7267e4a5c7 Check all table expressions. 2023-12-13 11:27:12 +00:00
Nikolai Kochetov
3e1dc6bcf9
Merge branch 'master' into analyzer-execution-names 2023-12-12 19:32:50 +01:00
Nikolai Kochetov
63533ad5bf Merge branch 'master' into analyzer-execution-names 2023-12-12 18:30:59 +00:00
Nikolai Kochetov
12f92c9beb Try to analyze join expression based on column source. 2023-12-12 18:11:53 +00:00
Alexey Milovidov
22200566c8 Revert "Merge pull request #39631 from ClickHouse/parallel-window"
This reverts commit 33cc853d61, reversing
changes made to b05a3d02ed.
2023-12-12 03:45:00 +01:00
Raúl Marín
1b844e2116 Apply JOIN check to custom key parallel replicas too 2023-12-11 14:22:58 +01:00
Raúl Marín
6370a1b824 Merge remote-tracking branch 'blessed/master' into i48496 2023-12-11 14:22:54 +01:00
Igor Nikonov
f7e6a17052 Merge remote-tracking branch 'origin/master' into pr-custom-key-failover 2023-12-10 20:21:47 +00:00
vdimir
f3fada0873
Analyzer: Fix JOIN ON true with join_use_nulls 2023-12-08 15:49:16 +00:00
vdimir
c42fade8a7
Analyzer allow join on const for semi and anti 2023-12-06 11:19:14 +00:00
Igor Nikonov
71204c2a82 Merge remote-tracking branch 'origin/master' into pr-custom-key-failover 2023-12-05 12:00:45 +00:00
Raúl Marín
cf22ff1673 Fix report by tidy 2023-12-05 10:47:21 +00:00
Anton Popov
69896d94be fix tests 2023-12-04 21:40:19 +00:00
Anton Popov
40a1744b7c Merge remote-tracking branch 'upstream/master' into HEAD 2023-12-04 18:10:43 +00:00
Raúl Marín
be367ec793 Merge remote-tracking branch 'blessed/master' into i48496 2023-12-04 12:41:53 +01:00
JackyWoo
8a68d51261
Add index to table system.numbers (#50909) 2023-12-01 19:59:25 +01:00
Raúl Marín
485fa70379 Disable parallel replicas + FINAL with the analyzer too 2023-12-01 13:50:10 +01:00
Igor Nikonov
b4bf611d5d Merge remote-tracking branch 'origin/master' into pr-custom-key-failover 2023-11-30 14:09:26 +00:00
Igor Nikonov
59daabe95a Some refactoring and cleanup
+ change load balancing for custom key w/o hedged connections
  (need the test though)
2023-11-30 14:08:01 +00:00
vdimir
470a092e3d
Merge pull request #51745 from ClickHouse/vdimir/setting_join_algorithm_order
Setting JoinAlgorithm respect specified order
2023-11-29 11:24:39 +01:00
vdimir
af81cb8252
Setting JoinAlgorithm respect specified order 2023-11-28 11:01:35 +00:00
Igor Nikonov
0434044a7e
Merge pull request #57054 from ClickHouse/pr-cleanup-narrow-dependency
Parallel replicas: cleanup, narrow dependency
2023-11-23 20:12:37 +01:00
Alexey Milovidov
54410f16c6
Merge pull request #57063 from ClickHouse/fix-duplicate-storage-set-analyzer
Fix `Duplicate set` for StorageSet with analyzer.
2023-11-22 13:36:44 +01:00
Anton Popov
65efb18842 Merge remote-tracking branch 'upstream/master' into HEAD 2023-11-21 17:30:38 +00:00
Igor Nikonov
63a1625b77 Merge remote-tracking branch 'origin/master' into pr-cleanup-narrow-dependency 2023-11-21 16:05:48 +00:00
Nikolai Kochetov
c85d739486 Fix Duplicate set for StorageSet with analyzer. 2023-11-21 15:57:53 +00:00
Igor Nikonov
83c6ac4f6c Remove storage as parameter dependency, only columns are needed 2023-11-21 12:14:12 +00:00
Dmitry Novik
1b8b090a0d Merge remote-tracking branch 'origin/master' into analyzer-execution-names 2023-11-20 22:52:26 +01:00
Nikolai Kochetov
b102c8e4b7 Merge branch 'master' into planner-support-transactions 2023-11-17 15:42:37 +01:00
Nikolai Kochetov
78dfbbfacb
Merge pull request #56499 from kitaisreal/analyzer-remove-unused-projection-columns
Analyzer remove unused projection columns
2023-11-16 17:40:32 +01:00
Maksim Kita
cc64397e92 Planner support transactions 2023-11-16 19:21:58 +03:00
Dmitry Novik
33cc853d61
Merge pull request #39631 from ClickHouse/parallel-window
Window function parallel evaluation
2023-11-16 11:50:16 +01:00
Maksim Kita
1562e24232 Fixed tests 2023-11-14 21:25:50 +03:00
vdimir
11b8395fe7
Address review comments 2023-11-14 11:07:27 +00:00
vdimir
3b73780bf6
Calculate sets from (array) joined actions 2023-11-14 10:35:43 +00:00
vdimir
5c8d0c25ee
Revert "Analyzer: fix logical error with set in array join"
This reverts commit fede5d8fcb.
2023-11-13 14:42:14 +00:00
vdimir
fede5d8fcb
Analyzer: fix logical error with set in array join 2023-11-13 11:54:01 +00:00
Nikolai Kochetov
a666f26056
Merge pull request #56419 from ClickHouse/fix-02404_memory_bound_merging-with-analyzer
Fix 02404_memory_bound_merging with analyzer.
2023-11-10 15:04:14 +01:00
Maksim Kita
bf37f05ccd Analyzer log used row policies 2023-11-09 19:43:31 +03:00
Nikolai Kochetov
bd04a27398 Fixing clang tidy 2023-11-07 21:25:47 +00:00
Nikolai Kochetov
749d2e207a Fix 02404_memory_bound_merging with analyzer. 2023-11-07 14:20:50 +00:00
vdimir
5b5c8db7ed
Support isNotDistinct in JOIN ON in analyzer 2023-11-06 19:34:57 +00:00
Dmitry Novik
23564148f9 Merge remote-tracking branch 'origin/master' into parallel-window 2023-11-03 17:53:51 +00:00
Nikolai Kochetov
03843d4af0 Fix stupid bug 2023-10-31 16:07:10 +00:00
Nikolai Kochetov
e885ea9257 Fix building sets. 2023-10-31 13:30:35 +00:00
Nikolai Kochetov
9894be8ceb Merge branch 'master' into fix-row-policy-analyzer 2023-10-31 11:45:36 +01:00
frinkr
18c50c11b3
Multithreading after window functions (#50771)
* feat: Preserve number of streams after evaluation the window functions to allow parallel stream processing

* fix style

* fix style

* fix style

* setting query_plan_preserve_num_streams_after_window_functions default true

* fix tests by SETTINGS query_plan_preserve_num_streams_after_window_functions=0

* fix test references

* Resize the streams after the last window function, to keep the order between WindowTransforms (and WindowTransform works on single stream anyway).

* feat: Preserve number of streams after evaluation the window functions to allow parallel stream processing

* fix style

* fix style

* fix style

* setting query_plan_preserve_num_streams_after_window_functions default true

* fix tests by SETTINGS query_plan_preserve_num_streams_after_window_functions=0

* fix test references

* Resize the streams after the last window function, to keep the order between WindowTransforms (and WindowTransform works on single stream anyway).

* add perf test

* perf: change the dataset from 50M to 5M

* rename query_plan_preserve_num_streams_after_window_functions -> query_plan_enable_multithreading_after_window_functions

* update test reference

* fix clang-tidy

---------

Co-authored-by: Nikita Taranov <nikita.taranov@clickhouse.com>
2023-10-27 12:36:28 +02:00
Kruglov Pavel
62b154930a
Merge pull request #53504 from filimonov/ignore_max_distributed_connections_for_async_remote
Disable logic max_threads=max_distributed_connections when async_socket_for_remote=1
2023-10-24 14:15:21 +02:00
Raúl Marín
a4f5e9e045 Improvements based on PR review 2023-10-19 15:36:48 +00:00
Raúl Marín
0c49f72433 Tidy 2023-10-17 16:08:50 +02:00
Raúl Marín
bfb5b8f441 Implement replica estimation on top of the analyzer 2023-10-16 18:34:58 +02:00
Raúl Marín
f799f5d7a1 Merge remote-tracking branch 'blessed/master' into parallel_replicas_row_estimation 2023-10-16 15:07:11 +02:00
Raúl Marín
478f635d60
Merge pull request #53792 from ClickHouse/revert-53782-revert-52762-planner-prepare-filters-for-analysis
Revert "Revert "Planner prepare filters for analysis""
2023-10-16 13:21:54 +02:00
Alexey Milovidov
f02f8f7a3d
Merge branch 'master' into fix-row-policy-analyzer 2023-10-14 02:24:22 +02:00
Anton Popov
1c9d883d8a Merge remote-tracking branch 'upstream/master' into HEAD 2023-10-13 17:17:01 +00:00
Dmitry Novik
d4be706ed4 Merge remote-tracking branch 'origin/master' into parallel-window 2023-10-13 13:20:38 +00:00
Raúl Marín
c5bd29792a Merge remote-tracking branch 'blessed/master' into parallel_replicas_row_estimation 2023-10-13 15:05:47 +02:00
Anton Popov
a01acf5d2a remove projection from StorageSnapshot 2023-10-13 03:18:43 +00:00
Anton Popov
fb666e137c remove old code of projection analysis 2023-10-12 23:25:20 +00:00
vdimir
3aac663bd2
fix 2023-10-12 10:46:58 +00:00
vdimir
84e838d038
Fix 02382_join_and_filtering_set
Copy missing corresponding code from Interpreter, adjust test (removed
with cube)
2023-10-12 10:45:56 +00:00
vdimir
1c70e04301
Fix 02242_join_rocksdb 2023-10-11 10:54:52 +00:00
Raúl Marín
95d2063e91 Merge remote-tracking branch 'blessed/master' into parallel_replicas_row_estimation 2023-10-10 17:29:45 +02:00
Igor Nikonov
0b4d76780f
Merge branch 'master' into revert-53782-revert-52762-planner-prepare-filters-for-analysis 2023-10-09 14:44:00 +02:00
Nikolai Kochetov
71c52cb8d6 Merge branch 'master' into fix-row-policy-analyzer 2023-10-05 12:14:20 +00:00
filimonov
bff832c7f0 Disable logic max_threads=max_distributed_connections when async_socket_for_remote=1
See #53287
2023-10-02 08:34:46 +02:00
Dmitry Novik
b7cfc4d82d Support in Planner 2023-09-25 15:34:00 +00:00
Kruglov Pavel
9c888ea42b
Merge pull request #53549 from Avogar/group-by-constant-keys
Optimize group by constant keys
2023-09-18 12:12:40 +02:00
vdimir
3414aa6f14
Analyzer: send constant columns to initiator in case of isToAggregationState 2023-09-15 08:59:30 +00:00
Nikolai Kochetov
26cbb62f2c Merge branch 'master' into fix-row-policy-analyzer 2023-09-11 14:18:55 +00:00
Kruglov Pavel
5b29640b22
Merge branch 'master' into group-by-constant-keys 2023-09-06 18:06:51 +02:00
Dmitry Novik
99d0f3586f Merge remote-tracking branch 'origin/master' into analyzer-execution-names 2023-09-01 17:33:33 +00:00
Dmitry Novik
5266511281 Merge remote-tracking branch 'origin/master' into revert-53782-revert-52762-planner-prepare-filters-for-analysis 2023-08-31 14:40:53 +00:00
Nikolai Kochetov
571abfd41e Disable trivial count optimization with additional_table_filters in analyzer. 2023-08-31 13:39:18 +00:00