Commit Graph

190 Commits

Author SHA1 Message Date
Nikolai Kochetov
d8f39b8df1 Fixing more tests. 2023-05-24 17:53:37 +00:00
Nikolai Kochetov
ff6400f91a Merge branch 'master' into refactor-subqueries-for-in 2023-05-22 13:07:51 +02:00
Azat Khuzhin
68138395eb Fix parameterized views when query parameter used multiple times in the query
Example:

    CREATE VIEW view AS
    SELECT *
    FROM system.one
    WHERE dummy = {k1:Int}+1 OR dummy = {k1:Int}+2
                   ^^                    ^^

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-16 15:13:21 +02:00
Nikolai Kochetov
618486815b Merge branch 'master' into refactor-subqueries-for-in 2023-05-05 20:39:09 +02:00
Nikolai Kochetov
f598a39ea2 Refactor PreparedSets [3] 2023-05-04 17:54:08 +00:00
Alexander Gololobov
2e20f2a14d Do not skip building set even when reading from remote 2023-05-02 21:31:56 +02:00
Nikolai Kochetov
80a2f30a0c Refactor PreparedSets [2] 2023-04-25 18:14:08 +00:00
Alexander Gololobov
28d0cc974a Cleanups 2023-04-14 16:12:18 +02:00
Alexander Gololobov
0ae74ddf42 Use different types for referencing local set and set that is stored in cache shared between tasks 2023-04-14 16:12:18 +02:00
Alexander Gololobov
05a9d1cbfc Cleanups 2023-04-14 16:12:18 +02:00
Alexander Gololobov
fbf09a1115 Fixes for new analyzer 2023-04-14 16:12:18 +02:00
Alexander Gololobov
adbe87e9d3 Fixes 2023-04-14 16:12:18 +02:00
Alexander Gololobov
0b9579bfb8 Reworked, testing 2023-04-14 16:12:18 +02:00
Alexander Gololobov
02876ed87d Share PreparedSet-s between task of the same mutation to reduce mem usage 2023-04-14 16:12:18 +02:00
save-my-heart
cea631a4c2 throw exception while non-parametric functions having parameters 2023-03-28 23:24:07 +08:00
Robert Schulze
5b036a1a3b
More preparation for libcxx(abi), llvm, clang-tidy 16 (follow-up to #47722) 2023-03-20 12:55:03 +00:00
SmitaRKulkarni
8ebbd03553
Merge pull request #46583 from ClickHouse/Support_parameterized_view_with_in_clause
Support for IN clause in parameterized views
2023-02-20 18:26:31 +01:00
Smita Kulkarni
e5e1027637 Support for IN clause in parameterized views
Implementation:
* In case of parameterized views, the IN clause cannot be evaluated as constant expression during CREATE VIEW, added a check to ignore this step in case of parameterized view.
* If parmeters are not in IN clause, we continue to evaluate it as constant expression.
2023-02-20 09:48:55 +01:00
Alexey Milovidov
d8cda3dbb8 Remove PVS-Studio 2023-02-19 23:30:05 +01:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
Smita Kulkarni
1f89db78a5 Added is_create_parameterized_view flag in ActionsVisitor, added functions for column manipulation for parameterized view in StorageView, updated tests to fix flaky test issues and addressed small review comments- 40907 Parameterized views as table functions 2023-01-03 11:00:39 +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
Smita Kulkarni
3e5f1a9178 Added is_parameterized_view in ASTFunction and fixed review comments - 40907 Parameterized views as table functions 2022-11-07 15:22:45 +01: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
3034229c37 Merge branch 'master' of github.com:ClickHouse/ClickHouse into 40907_Parameterized_views_as_table_functions 2022-10-17 18:37:31 +02:00
Smita Kulkarni
614fd4cf42 Added is_parameterized_view to Context and removed flag from ASTs, updated to use tryGetTable, addressed review comments - 40907 Parameterized views as table functions 2022-10-17 18:11:22 +02:00
Vitaly Baranov
91c438eebe
Merge pull request #42263 from vitlibar/refactor-udf
Refactor the implementation of user-defined functions
2022-10-15 12:33:10 +02:00
Vitaly Baranov
2e59d671fc Split UserDefinedSQLObjectsLoader to interface and implementation. 2022-10-13 10:32:32 +02:00
lhuang09287750
215acf5e5b check the result of conversion for decimal IN float 2022-10-12 15:28:27 +02:00
Smita Kulkarni
7033a56ff2 Moved QueryParameterVisitor to Parsers & EXPLAIN SYNTAX test fix - 40907 Parameterized views as table functions 2022-10-03 16:42:44 +02: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
vdimir
a6dc99983d
Fix tidy build 2022-09-19 08:42:23 +00:00
vdimir
5c9bfbc116
Fix incorrect result in case of decimal precision loss in IN operator 2022-09-19 08:42:22 +00:00
Dmitry Novik
c236706703
Merge branch 'master' into grouping-comp 2022-09-12 15:19:51 +02:00
Alexey Milovidov
fd235919aa Remove some methods 2022-09-10 05:04:40 +02:00
Dmitry Novik
003483b616 Add compatibility setting 2022-08-30 20:49:40 +02:00
vdimir
b7c5c54181
Fix build 2022-08-10 13:43:55 +00:00
vdimir
5eb4cd39e0
Merge branch 'master' into refactor-prepared-sets 2022-08-10 11:47:49 +00:00
Maksim Kita
c030fd05e7 ActionsDAG rename index to outputs 2022-08-08 18:01:32 +02:00
vdimir
708747ca0b
Merge branch 'master' into refactor-prepared-sets 2022-08-08 14:27:18 +02:00
vdimir
8eecb9ef82
upd PreparedSets: rename/change signature of methods, add comments 2022-07-27 11:22:16 +00:00
vdimir
d9928ac93d
Add methods to SubqueryForSet, do not use refernce to SetPtr 2022-07-26 18:39:09 +00:00
vdimir
1e3fa2e01f
Refactor PreparedSets/SubqueryForSet 2022-07-26 18:39:02 +00:00
Nikolai Kochetov
f570cde815 Fixing build. 2022-07-19 20:19:57 +00:00
Nikolai Kochetov
eaeb30a71a Merge branch 'master' into use-dag-in-key-condition 2022-07-19 18:39:52 +02:00
Dmitry Novik
d046132265 Allow to use higher-order functions in window expressions 2022-07-11 23:47:46 +00:00
Dmitry Novik
fd9d897df2 Fix ActionsDAG for window expressions 2022-07-11 23:18:44 +00:00
Dmitry Novik
f9b71551d0 Cleanup ActionsVisitor 2022-06-16 15:11:16 +00:00