Commit Graph

51 Commits

Author SHA1 Message Date
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
Nikolay Degterinsky
24b686734d Fix build 2023-01-15 13:46:55 +00:00
Nikolay Degterinsky
36c20bf293 Merge remote-tracking branch 'upstream/master' into better_asterisk_parser 2023-01-13 19:15:55 +00:00
Smita Kulkarni
60a34b2f36 Fixed issue with table alias for failing tests - Fix for qualified asterisks with alias table name and column transformer 2023-01-02 09:40:49 +01:00
Smita Kulkarni
c846720f3d Fix for qualified asterisks with alias table name and column transformer
Implementation:
* Removed check that qualified asterisks should have only 1 child. It can have more than 1 children when the rest of the children are column transformers. Added check for the same.
* Updated ExtractAsterisksMatcher data to store table name and table alias name as both can be referenced in the query.
Testing:
* Added a test 02518_qualified_asterisks_alias_table_name.sql
2022-12-30 16:12:18 +01:00
Nikolay Degterinsky
9b6d31b95d
Merge branch 'master' into perf_experiment 2022-12-13 17:15:07 +01:00
Nikolay Degterinsky
1a090e9901 Better implementation 2022-11-30 02:23:26 +00:00
Nikolay Degterinsky
72acedfba6 Merge remote-tracking branch 'upstream/master' into better_asterisk_parser 2022-11-29 22:48:12 +00:00
Salvatore Mesoraca
0488132133 Do not assume that the original query was valid when transforming JOINs
Before this change, during the JOIN transformation, the query
was rewritten in such a way that some references to non-existing
columns were replaced with references to columns with the same
name in other tables.

We now check that the original query was correct before making
changes that may fix it accidentally.
2022-11-24 09:48:51 +01:00
Alexey Milovidov
127631ee47
Merge branch 'master' into perf_experiment 2022-11-12 18:58:25 +01:00
Nikolay Degterinsky
c6ea55403e Merge remote-tracking branch 'upstream/master' into better_asterisk_parser 2022-11-04 22:37:59 +00:00
zzsmdfj
1a8568473c update code style 2022-11-04 10:04:01 +08:00
Nikolay Degterinsky
88d815c63e Improve Asterisk and ColumnMatcher parser 2022-11-02 06:21:02 +00:00
zzsmdfj
61123b7f54 to fix join to subqueries rewriter null pointer 2022-11-02 11:34:15 +08:00
Raúl Marín
af019932bc Style 2022-10-19 17:20:21 +02:00
Raúl Marín
e60415d07d Make clang-tidy happy 2022-10-18 11:40:12 +02:00
Raúl Marín
19310a5877 Replace std::vector with absl inlined_vector 2022-10-13 21:50:11 +02:00
Alexander Tokmakov
82b50e79cf
Merge branch 'master' into tsan_clang_15 2022-08-02 13:00:55 +03:00
Alexander Tokmakov
0d68b1c67f fix build with clang-15 2022-08-01 18:00:54 +02:00
Maksim Kita
8fc6bad4f4 Join enums refactoring 2022-07-29 18:35:05 +02:00
vdimir
2a9942ee80
Add setting multiple_joins_try_to_keep_original_names 2022-06-16 15:50:03 +00:00
Alexey Milovidov
ec9b86fd03
Merge branch 'master' into fixcolumnmatcher 2022-04-21 02:15:25 +03:00
Amos Bird
158a25d5fa
Fix column matcher and column transformer 2022-04-20 01:22:04 +08: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
vdimir
eb7ac4c3a6
Handle empty expression list in cross join 2022-04-07 11:32:32 +00:00
vdimir
69160fa3e3
remove dead code in needRewrite function 2022-04-07 10:46:39 +00:00
Maksim Kita
b1a956c5f1 clang-tidy check performance-move-const-arg fix 2022-03-02 18:15:27 +00:00
vdimir
042e61febf
Allow identifiers staring with numbers in multiple joins 2021-10-18 13:41:40 +03:00
vdimir
a817bed287
Replace isComma || isCross -> isCrossOrComma 2021-10-01 14:52:12 +03:00
vdimir
593b7e9bbb
Do not throw exception if unknwon column met while join rewriting 2021-08-02 14:51:34 +03:00
Ivan
a7fa4e641c
Merge branch 'master' into ast-table-identifier-2 2021-06-10 16:43:22 +03:00
Nikolai Kochetov
9e0f3e5e9e Avoid using empty table name in identifier. 2021-06-09 13:13:13 +03:00
Ivan Lezhankin
54a385d1b0 More fixes 2021-05-31 18:00:04 +03:00
Ivan Lezhankin
bd16dd22b9 Merge remote-tracking branch 'upstream/master' into ast-table-identifier-2 2021-05-14 15:40:33 +03:00
Maksim Kita
7357c35197 Fixed code review issues 2021-04-22 17:19:47 +03:00
Maksim Kita
8fde34fc52 Updated tests 2021-04-22 16:23:42 +03:00
Maksim Kita
86ffa9fcfa JoinToSubqueriesVisitor ASTColumnsMatcher fix 2021-04-22 13:14:35 +03:00
Ivan Lezhankin
b559e45d93 Some minor fixes 2021-04-12 20:19:46 +03:00
Ivan Lezhankin
3da3250bfd Merge branch 'master' into ast-table-identifier-2 2021-04-09 17:56:15 +03:00
Daniel Qin
25d8c047c5
Add a check to avoid exception when long alias equals to column (#18968)
* Add a check to avoid exception when long alias equas to column

* try fix with add an underlying table name, add function test

* format code

Co-authored-by: Ling Qin <lqin@freewheel.com>
2021-01-20 18:34:17 +03:00
Ivan Lezhankin
a09559b2cb More fixes 2020-11-18 19:55:55 +03:00
Ivan
1d170f5745
ASTTableIdentifier Part #1: improve internal representation of ASTIdentifier name (#16149)
* Use only |name_parts| as primary name source

* Restore legacy logic for table restoration

* Fix build

* Fix tests

* Add pytest server config

* Fix tests

* Fixes due to review
2020-10-24 21:46:10 +03:00
Artem Zuikov
0f6a6453fe
Remove multiple_joins_rewriter v1 (#15472) 2020-09-30 23:11:49 +03:00
Alexey Milovidov
95a7a09c37 Fix transform query for external databases in presense of aliases #12032 2020-07-06 04:50:45 +03:00
Alexey Milovidov
1462a66d1e Fix typos 2020-06-27 22:05:00 +03:00
Artem Zuikov
a3d6e047fe
Fix lambdas with multiple_joins_rewriter v2 (#11587) 2020-06-16 19:32:32 +03:00
Artem Zuikov
24059efad5
Change push down logic in VIEW (#11513) 2020-06-15 15:36:10 +03:00
Alexey Milovidov
0a7edce036 Checkpoint 2020-04-22 09:01:33 +03:00
Alexey Milovidov
cdeda4ab91 Fix usage of max_parser_depth setting; remove harmful default function arguments 2020-04-16 04:06:10 +03:00
Artem Zuikov
f08cdfcc4c fix count(*) with multiple_joins_rewriter_version = 1 2020-04-15 20:47:08 +03:00