Commit Graph

853 Commits

Author SHA1 Message Date
Antonio Andelic
3b0c63551e Combine approaches 2023-01-19 10:26:38 +00:00
Antonio Andelic
2a1f35e661 Revert some changes 2023-01-19 07:59:57 +00:00
Antonio Andelic
dd31de18a3 Extend where correctly 2023-01-17 13:31:09 +00:00
Antonio Andelic
bd352068d7 Turn replicas into shard for custom_key 2023-01-17 12:34:42 +00:00
Antonio Andelic
57e771226c Add range mode for custom key 2023-01-16 10:11:21 +00:00
Antonio Andelic
e64f07e72b Merge branch 'master' into custom-key-parallel-replicas 2023-01-13 08:44:53 +00:00
Kseniia Sumarokova
db3e0219fc
Merge pull request #41687 from ClickHouse/40907_Parameterized_views_as_table_functions
40907 Parameterized views as table functions
2023-01-12 14:24:32 +01:00
Antonio Andelic
f950b75ef0 Fix 2023-01-11 10:42:01 +00:00
Antonio Andelic
19e5988d33 Better 2023-01-11 09:57:13 +00:00
Antonio Andelic
fbe4808b6b Add support for custom key in parallel replicas 2023-01-10 13:13:43 +00:00
Alexey Milovidov
3963eeae16
Merge pull request #45058 from nickitat/fix_grouping_sets_with_memory_efficient_aggr
Disable memory efficient merging for distributed aggregation when grouping sets are present
2023-01-10 05:08:55 +03:00
Nikita Taranov
82963e4227 impl 2023-01-09 12:12:55 +00:00
Nikolai Kochetov
533911b28b Respect requested columns order for select. 2023-01-04 19:59:15 +00:00
Smita Kulkarni
a6f860f24e Fixed review comments and updated FunctionParameterValuesVisitor to use visitFunction - 40907 Parameterized views as table functions 2022-12-23 17:57:17 +01:00
Smita Kulkarni
5001cf9fa2 Updated to get column data type based not function , not the query parameter type , added test for the same - 40907 Parameterized views as table functions 2022-12-19 15:05:38 +01:00
Smita Kulkarni
22c2956a06 Updated comment on fetching parameter values from query and fixed style comment- 40907 Parameterized views as table functions 2022-12-16 12:19:11 +01:00
Smita Kulkarni
dd8df3347b Addressed style review comments and removed bool variables assignment from Clone of ASTs - 40907 Parameterized views as table functions 2022-12-16 11:11:19 +01:00
Smita Kulkarni
16d8fd02fb Merge branch 'master' into 40907_Parameterized_views_as_table_functions 2022-12-16 08:52:48 +01:00
Nikolai Kochetov
43b3c10e9a Add a separate optimisation to enable memory bound aggregation. 2022-11-30 14:31:39 +00:00
Smita Kulkarni
953e1068b5 Merge branch 'master' into 40907_Parameterized_views_as_table_functions 2022-11-28 19:10:32 +01:00
Smita Kulkarni
0545e24151 Updated to support query parameters in different parts of query (SELECT, ORDERBY, GROUP BY), updated the approach in WHERE & HAVING, added tests for the same - 40907 Parameterized views as table functions 2022-11-28 19:05:01 +01:00
Nikolai Kochetov
6d0646ed8f
Merge branch 'master' into aggregating-in-order-from-query-plan 2022-11-28 16:53:29 +01:00
Nikita Taranov
8ed5cfc265
Memory bound merging for distributed aggregation in order (#40879)
* impl

* fix style

* make executeQueryWithParallelReplicas similar to executeQuery

* impl for parallel replicas

* cleaner code for remote sorting properties

* update test

* fix

* handle when nodes of old versions participate

* small fixes

* temporary enable for testing

* fix after merge

* Revert "temporary enable for testing"

This reverts commit cce7f8884c.

* review fixes

* add bc test

* Update src/Core/Settings.h
2022-11-28 00:41:31 +01:00
Nikolai Kochetov
62debf42b4 Aggregating in order [in progress]. 2022-11-23 18:38:12 +00:00
Igor Nikonov
7f8d07e4b7 Fix: limit hint for DISTINCT ignores LIMIT BY
+ test
2022-11-20 23:06:57 +00:00
Smita Kulkarni
6d35bc06c5 Fixed style check fail in InterpreterSelectQuery.cpp - 40907 Parameterized views as table functions 2022-11-16 13:01:02 +01:00
Smita Kulkarni
95abe5d027 Updated to support query parameters in HAVING clause and addressed review comments - 40907 Parameterized views as table functions 2022-11-16 12:27:08 +01:00
Smita Kulkarni
4dec8337f0 Merge branch 'master' into 40907_Parameterized_views_as_table_functions 2022-11-11 19:04:35 +01:00
Nikolai Kochetov
63d06c8b53
Merge pull request #42829 from ClickHouse/read-in-order-from-query-plan
Read-in-order over query plan
2022-11-11 12:15:20 +01:00
Nikolai Kochetov
997881c7f7 Review fixes. 2022-11-09 16:07:38 +00:00
Smita Kulkarni
779b9197e3 Moved is_create_parameterized_view check inside finalize function and refactor check for isParmaeterizedView when replacing subquery - 40907 Parameterized views as table functions 2022-11-08 11:03:40 +01:00
Nikolai Kochetov
9ffebf4a0c Fixing read-in-order for special storages. 2022-11-01 19:51:52 +00:00
Smita Kulkarni
9aa06e48f6 Merge branch 'master' into 40907_Parameterized_views_as_table_functions 2022-10-31 15:46:52 +01:00
Vladimir Chebotaryov
d17b7387f9 Reworked changes to std::shared_ptr<const RowPolicyFilter>. 2022-10-27 10:42:55 +03:00
Vladimir Chebotaryov
6d5d31e49c Removed UUID's. 2022-10-27 10:42:26 +03:00
Vladimir Chebotaryov
0707d88311 Removed extendQueryLogElemImplImpl. 2022-10-27 10:42:25 +03:00
Vladimir Chebotaryov
c28e439c33 Review fixes. 2022-10-27 10:42:22 +03:00
Vladimir Chebotaryov
4cabe1f57c Added applied row-level policies to system.query_log. 2022-10-27 10:41:47 +03:00
Kruglov Pavel
219553df8d
Merge pull request #42580 from hanfei1991/fei/limit_max_rows
fix behaviour of max_rows_to_read for trival limit queries
2022-10-26 14:09:59 +02:00
Han Fei
2fc91fd338 fix behaviour of max_rows_to_read for trival limit queries 2022-10-22 18:27:24 +02:00
Vitaly Baranov
2033ea1216 Support subqueries in row policy filters. 2022-10-21 15:42:29 +02:00
Smita Kulkarni
d8fe1d2d63 Moved is_create_parameterized_view out of Context , and added into ActionsMatcher::Data and SelectQueryInfo - 40907 Parameterized views as table functions 2022-10-21 14:45:28 +02:00
Smita Kulkarni
e4ac3d0e18 Added FunctionParameterValuesVisitor, renamed bool to is_create_parameterized_view, added checks for parameterized view and support & test to propagate query parameters - 40907 Parameterized views as table functions 2022-10-19 18:30:03 +02:00
Smita Kulkarni
ec95294621 Merge branch 'master' into 40907_Parameterized_views_as_table_functions 2022-10-05 11:48:14 +02:00
vdimir
c0898ce289
Use abstraction for temporary data on disk in Sort and Aggregation 2022-09-29 09:51:41 +00:00
Smita Kulkarni
bbc33a54b2 Addressed review comments - 40907 Parameterized views as table functions
Implementation
* Fix for clang-today build fails - updated to use const in Context.cpp & const function in ActionsVisitior.cpp
* Updated to use QueryParameterVisitor to check if query has query parameters
* Updated executeTableFunction to check if table/table exists instead of try-catch approach
* Fixed small review comments and style comments.
Documentation:
* Addressed review comments and added the LIVE view part which was removed by mistake in the previous commits.
2022-09-27 16:30:59 +02:00
Smita Kulkarni
f801772a86 40907 Parameterized views as table functions
Implementation:
* Updated parsers by adding a bool allow_query_parameters while creating ordinary view, which is used in interpreters to allow query parameters in SELECT.
* Added a check in ActionsVisitor if multiple parameters have same names while creating parameterised view.
* Added bool in StorageView to represent parameterized view.
* Updated processing of SELECT with parameter values to check for views and added substitution of values in the query parameters.

Testing:
* Added a test tests/queries/0_stateless/02428_parameterized_view.sql

Documentation:
* Updated the english documentation for VIEW.
2022-09-23 14:04:43 +02:00
Alexey Milovidov
45afacdae4
Merge pull request #41186 from ClickHouse/fix-three-fourth-of-trash
Fix more than half of the trash
2022-09-22 07:28:26 +03:00
Nikita Taranov
100c055510
Prefetching in aggregation (#39304)
* impl

* stash

* clean up

* do not apply when HT is small

* make branch static

* also in merge

* do not hardcode look ahead value

* fix

* apply to methods with cheap key calculation

* more tests

* silence tidy

* fix build

* support HashMethodKeysFixed

* apply during merge only for cheap

* stash

* fixes

* rename method

* add feature flag

* cache prefetch threshold value

* fix

* fix

* Update HashMap.h

* fix typo

* 256KB as default l2 size

Co-authored-by: Alexey Milovidov <milovidov@clickhouse.com>
2022-09-21 18:59:07 +02:00
Alexey Milovidov
ab4db2d0c4 Fix 5/6 of trash 2022-09-19 08:50:53 +02:00