Commit Graph

8 Commits

Author SHA1 Message Date
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
Smita Kulkarni
cb04c6301c Support for cte in parameterized views
Implementation:
* Updated to allow query parameters while evaluating scalar subqueries.
Testing:
* Added test case with cute for parameterized view.
2023-03-27 16:30:53 +02:00
Smita Kulkarni
aa079efbb7 Addressed review comments 2023-03-21 18:29:26 +01:00
Smita Kulkarni
f1dae287b5 Updated parameterized view test to use ReplicatedMergeTree 2023-03-20 07:29:06 +01:00
Smita Kulkarni
87cb2e1629 Support for subquery in parameterized views
Implementation:
* Updated to pass the parameter is_create_parameterized_view to subquery processing.
Testing:
* Added test case with subquery for parameterized view.
2023-03-19 19:41:19 +01:00
Smita Kulkarni
e85096b444 Updated variable name to fix build & call to getSampleBlockForColumns. Added a test for substring parameter name. 2023-03-12 11:00:17 +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
Smita Kulkarni
74ba9d1f2b Updated test to .sh to use unique database name - 40907 Parameterized views as table functions 2023-01-10 10:15:38 +01:00