Smita Kulkarni
953e1068b5
Merge branch 'master' into 40907_Parameterized_views_as_table_functions
2022-11-28 19:10:32 +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
taofengliu
d03cf4731d
parser format
2022-11-05 17:22:41 +08:00
Smita Kulkarni
1dde95b6e7
Updated hasQueryParameters using mutable optional bool and typo comment fixed - 40907 Parameterized views as table functions
2022-10-20 10:31:41 +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
taofengliu
46739eeaf8
support GROUP BY ALL
2022-10-18 10:46:37 +08: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
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
e5c0c6a1b6
Addressed review comments - 40907 Parameterized views as table functions
...
Implementation
* Updated handling of has_query_parameters to avoid recalculation.
* Fixed style comments
* Updated formatImpl of ASTTableExpression to prioritise table_function before sub_query.
Testing:
* Added test for ATTACH, DETACH, INSERT INTO view and EXPLAIN SYNTAX to tests/queries/0_stateless/02428_parameterized_view.sql
2022-10-03 14:27:38 +02:00
Smita Kulkarni
a12d2fcf44
Updated ASTSelectQuery to fix FastTest fails for 40907 Parameterized views as table functions
2022-09-27 22:13:20 +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
4fb1dffb9e
40907 Parameterized views as table functions
...
Implementation
* Fix for clang-today build fails - updated to use const reference in ASTSelectQuery.cpp & ASTSelectWithUnionQuery.cpp
2022-09-26 13:08:54 +02:00
Smita Kulkarni
4d414b69b8
40907 Parameterized views as table functions
...
Implementation
* Fix for clang-today build fails - updated to use const reference in ASTSelectQuery.cpp
2022-09-26 10:30:28 +02:00
Smita Kulkarni
456baddbc7
40907 Parameterized views as table functions
...
Implementation
* Fix for Build fails - updated conversion of Field to String and includes
2022-09-24 12:01:18 +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
Raúl Marín
f814908364
Improvements based on comments from the PR
2022-08-22 17:39:33 +02:00
Raúl Marín
e2e4b0b925
Merge remote-tracking branch 'blessed/master' into avoid_printing_settings
2022-08-10 16:43:52 +02:00
Maksim Kita
3e6b663020
ASTSelectQuery added hasJoin method
2022-08-03 11:25:45 +02:00
Raúl Marín
dfc20266c7
Avoid printing SETTINGS twice when formatting a query
2022-07-06 14:06:04 +02:00
Dmitry Novik
5128afb0b7
Do not prepend whitespace in grouping sets
2022-05-13 16:14:41 +00:00
Dmitry Novik
fb5766287c
Cleanup GROUPING SETS formating
2022-05-13 16:14:41 +00:00
Dmitry Novik
61deae7105
Merge branch 'master' into grouping-sets-fix
2022-04-21 03:34:42 +02:00
Robert Schulze
118e94523c
Activate clang-tidy warning "readability-container-contains"
...
This check suggests replacing <Container>.count() by
<Container>.contains() which is more speaking and in case of
multimaps/multisets also faster.
2022-04-18 23:53:11 +02:00
Dmitry Novik
a16710c750
Merge remote-tracking branch 'origin/master' into grouping-sets-fix
2022-04-14 17:29:51 +00:00
Yakov Olkhovskiy
ac441b9dcf
compiler suggestions
2022-04-06 00:05:06 -04:00
Yakov Olkhovskiy
e0d6033c39
all columns can participate in interpolate expression despite if they are selected or not, some optimization on expressionless INTERPOLATE
2022-04-05 14:26:49 -04:00
Yakov Olkhovskiy
a8e1671a76
type match check for INTERPOLATE expressions added, bugfix, printout fixed
2022-03-18 16:44:27 -04:00
Dmitry Novik
67df01d025
Merge branch 'master' into grouping-sets-fix
2022-02-22 04:18:03 -08:00
Raúl Marín
045c92e2b9
Fix readability issues
2022-01-26 17:36:45 +01:00
Raúl Marín
4b5ab80e3b
Better scalar cache handling
...
- Fixes global CTE scalar cache.
- Adds MVs back (views dependent on the source are cached locally and others globally
2022-01-26 17:36:45 +01:00
Dmitry Novik
e957054409
fix GROUPING SETS formating
2022-01-11 11:26:13 +00:00
fanzhou
6c6d3015de
1. refactor ExpressionAnalyzer
...
2. Update formatAST to support grouping sets query with distributed table
3. modify astExpression to support function in grouping sets
2022-01-11 11:26:12 +00:00
MaxTheHuman
a8f4f3d6b0
init commit with parsing and BAD realisation
2022-01-11 11:26:09 +00:00
alexey-milovidov
0a55fa3dc2
Revert "Grouping sets dev"
2021-12-25 20:30:31 +03:00
Dmitry Novik
f138122259
fix GROUPING SETS formating
2021-12-07 16:44:09 +03:00
fanzhou
b94f8878ff
1. refactor ExpressionAnalyzer
...
2. Update formatAST to support grouping sets query with distributed table
3. modify astExpression to support function in grouping sets
2021-11-30 14:58:55 +03:00
MaxTheHuman
8b95b7d271
init commit with parsing and BAD realisation
2021-11-23 17:58:16 +03:00
vdimir
e8e26463bf
Change signature of ASTSelectQuery::arrayJoinExpressionList
2021-08-31 15:27:44 +03:00
tavplubix
cd311e2e87
Update ASTSelectQuery.cpp
2021-06-30 12:41:46 +03:00
Alexander Tokmakov
fd914f3d97
fix 'Not found column' error in MaterializeMySQL
2021-06-29 20:47:41 +03:00
mergify[bot]
970243850f
Merge branch 'master' into ast-table-identifier-2
2021-05-21 12:56:49 +00:00
Azat Khuzhin
8b438bcd3c
Change formatting of subqueries (make it more human friendly)
...
Fix trailing whitespaces in FROM/IN clause with subqueries in multiline
mode, and also changes the output of the queries slightly in a more
human friendly way.
Before:
$ clickhouse-format <<<'select * from system.one, (select * from system.one)'
SELECT *
FROM system.one
,
(
SELECT *
FROM system.one
)
After:
$ clickhouse-format <<<'select * from system.one, (select * from system.one)'
SELECT *
FROM system.one,
(
SELECT *
FROM system.one
)
v2: Fix subqueries formatting in a different way
v3: Adjust *.reference in tests
v4: Fix modernize-loop-convert in ASTTablesInSelectQuery
2021-05-20 21:04:12 +03:00
Ivan Lezhankin
3da3250bfd
Merge branch 'master' into ast-table-identifier-2
2021-04-09 17:56:15 +03:00
Alexander Kuzmenkov
02eee100a0
formatting fixes
2021-03-24 15:36:39 +03:00
Alexander Kuzmenkov
f2ef536dfb
fix formatting
2021-03-24 01:40:27 +03:00
Alexey Milovidov
5b7c437e6d
Minor modification
2021-01-31 11:24:37 +03:00
Alexander Kuzmenkov
703731c547
something works
2021-01-13 22:29:52 +03:00
Ivan Lezhankin
9250d5c4e9
Merge remote-tracking branch 'upstream/master' into ast-table-identifier-2
2020-11-12 16:25:46 +03:00
Alexander Tokmakov
62ff00ee8b
use WriteBuffer in formatAST(...)
2020-11-09 19:05:40 +03:00
Ivan Lezhankin
4083406f54
Introduce ASTTableIdentifier
2020-10-26 18:49:00 +03:00