Commit Graph

670 Commits

Author SHA1 Message Date
Vitaly Baranov
001e4daf25 Read prefix before blocks while executing subquery. 2019-07-11 16:53:26 +03:00
chertus
ef41b16a44 fix wrong ExpressionAnalyzer.array_join_columns calculation 2019-07-08 23:06:17 +03:00
chertus
f19dee706a move IColumn.isColumnConst() outside of interface 2019-06-27 22:28:52 +03:00
alexey-milovidov
1d98441c34
Update ExpressionAnalyzer.cpp 2019-05-25 13:51:48 +03:00
Constantin S. Pan
cbc0f56af1 Mark all input columns in LIMIT BY as required output
The query analyzer only marks the actual arguments of LIMIT BY as required
output for the LimitBy step in the pipeline. This is fine, unless the query is
distributed, in which case the first stage might remove a column that is used
at the second stage (e.g. for ORDER BY) but is not part of the final select.

Prevent removal of any columns in LimitBy by marking all input columns as
required output.
2019-05-24 09:53:09 +01:00
Ivan Lezhankin
0821d62516 Merge ITableDeclaration into IStorage.
Also a couple of massive include-refactorings with better forwarding
2019-05-17 17:34:25 +03:00
chertus
20e7de7cce fix perf regression: do not add right join key to result if possible 2019-05-13 21:58:15 +03:00
zhang2014
359e4c33bd try fix push require columns with join 2019-05-05 19:12:07 +08:00
Alexey Milovidov
b52f1257a9 Removed useless include 2019-04-23 19:48:46 +03:00
chertus
82dc1fb1db rewrite ASTSelectQuery (consistent children) 2019-04-09 17:22:35 +03:00
Nikolai Kochetov
523c8e5ec1 Remove LowCardinality from aggregate function argument types. #4919 2019-04-05 19:52:31 +03:00
chertus
aae1e56214 fix typo 2019-04-05 15:57:08 +03:00
chertus
f50a0778fb fix missing column error message 2019-04-05 15:50:14 +03:00
Ivan Lezhankin
4f6a494af8 Revert references where they were before refactoring. 2019-03-15 19:14:13 +03:00
Ivan Lezhankin
d1ead22073 Rename As<…> → as<…> 2019-03-11 16:22:51 +03:00
Ivan Lezhankin
a7e838e328 Replace all other casts to method IAST::As<Derived>
Also remove some redundant methods like IsIdentifier() et. al.
2019-03-11 15:49:39 +03:00
Ivan Lezhankin
0e325c7a4a Replace const typeid_casts with As<Derived>() method invocations 2019-03-08 12:48:20 +03:00
Alexey Zatelepin
0d7ab9e3ea allow acquiring read lock to a table out of order if it was already locked by the same query [#CLICKHOUSE-3789]
this is important in preventing ALTER deadlocks
2019-02-27 21:34:38 +03:00
chertus
1fc6c60668 undo unneeded changes 2019-02-15 18:47:39 +03:00
chertus
b72d12d12e join on allow aliases for right table columns 2019-02-15 18:47:39 +03:00
chertus
93e0621a2c fix wrong query in push down test 2019-02-12 18:08:21 +03:00
alexey-milovidov
0dd618b9ad
Merge pull request #4326 from yandex/duplicate-includes
Removed duplicate includes
2019-02-10 22:31:37 +03:00
Alexey Milovidov
d9ab923a2a Fixed typo 2019-02-10 21:14:23 +03:00
Alexey Milovidov
ba3cb83a84 Removed duplicate includes 2019-02-10 20:12:22 +03:00
chertus
c24ba390b3 fix test 2019-02-08 20:21:28 +03:00
chertus
668b220258 fix push down 2019-02-08 18:37:43 +03:00
chertus
6309377323 remove fix for JOIN ON columns in collectUsedColumns 2019-02-08 14:14:48 +03:00
chertus
9a8db441c3 some mote ExpressionAnalyzer refactoring 2019-02-06 17:48:05 +03:00
alexey-milovidov
fdfb60318c
Merge pull request #4193 from 4ertus2/ast
Refactoring: extract SubqueryForSet to own files
2019-02-02 15:28:31 +03:00
chertus
866c2b2e78 move required right keys calculation to Join.cpp 2019-01-30 18:51:39 +03:00
chertus
d6450bc488 Refactoring: extract SubqueryForSet to own files 2019-01-30 15:01:00 +03:00
Alexey Zatelepin
f3b4292fc6 add data types to the prepared_sets key for literals #4058 2019-01-23 14:20:01 +03:00
Alexey Zatelepin
5154814bf9 try to get rid of IAST::range #4058 2019-01-23 14:19:22 +03:00
chertus
8bb35ac987 minor changes 2019-01-16 21:38:19 +03:00
chertus
dbb88e8cb4 helpers for ASTIdentifier (hide semantic and casts) 2019-01-14 21:15:04 +03:00
chertus
0084785898 fix build 2019-01-11 00:05:01 +03:00
alexey-milovidov
644e9fc31f
Merge pull request #3930 from 4ertus2/ast
rewrite ExpressionAnalyzer.collectUsedColumns CLICKHOUSE-3996
2018-12-27 18:36:22 +03:00
alexey-milovidov
67dbfd8e81
Update ExpressionAnalyzer.cpp 2018-12-26 23:33:29 +03:00
chertus
0812f79421 remove unused code 2018-12-26 21:56:21 +03:00
chertus
6ea13516f0 rewrite ExpressionAnalyzer.collectUsedColumns CLICKHOUSE-3996 2018-12-26 17:43:25 +03:00
chertus
cbf3c34cf3 minor improvement in ExpressionAnalyzer + array join 2018-12-19 16:13:51 +03:00
alexey-milovidov
7af621f6f7
Merge pull request #3728 from amosbird/join
Versatile StorageJoin
2018-12-10 23:16:53 +03:00
chertus
9236e94e1b ExecuteScalarSubqueriesVisitor via InDepthNodeVisitor 2018-12-10 16:02:45 +03:00
chertus
2afe664d67 RequiredSourceColumnsVisitor via InDepthNodeVisitor 2018-12-07 19:28:20 +03:00
chertus
31c629bf55 GlobalSubqueriesMatcher via InDepthNodeVisitor 2018-12-07 18:36:54 +03:00
chertus
abffefc830 ExternalTablesVisitor via InDepthNodeVisitor 2018-12-07 18:14:50 +03:00
chertus
75af882cf3 fix AST debug print with underline symbol 2018-12-07 15:34:40 +03:00
Amos Bird
65b654a1b6 Versatile StorageJoin
This commit does the following:

1. StorageJoin with simple keys now supports reading
2. StorageJoin can be created with Join settings applied. Syntax is
similar to MergeTree and Kafka
3. Left Any StorageJoin with one simple key can be used as a
dictionary-like structure by function joinGet.

Examples are listed in the related test file.
2018-12-02 16:49:39 +08:00
Alexey Zatelepin
d3d9242462 Merge branch 'master' into alter-order-by
Conflicts:
	dbms/src/Parsers/ASTAlterQuery.h
	dbms/src/Parsers/ParserAlterQuery.cpp
	dbms/src/Storages/AlterCommands.cpp
	dbms/src/Storages/AlterCommands.h
2018-11-26 16:01:48 +03:00
Alexey Milovidov
5a0feee45e Removed "conditional computations" feature, because it is not ready #2272 2018-11-26 04:39:04 +03:00
Alexey Milovidov
c77930fe30 Whitespaces [#CLICKHOUSE-2] 2018-11-26 03:56:50 +03:00
Alexey Milovidov
6f48ebbb06 Better exception message in case of "unknown identifier" [#CLICKHOUSE-4142] 2018-11-21 23:35:55 +03:00
Alexey Zatelepin
29b34365e6 Merge branch 'master' into alter-order-by
Conflicts:
	dbms/src/Interpreters/ExpressionAnalyzer.cpp
	dbms/src/Storages/MergeTree/MergeTreeData.cpp
	dbms/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp
2018-11-13 16:27:19 +03:00
Alexey Zatelepin
7167bfd7b3 fix prewhere with FINAL for VersionedCollapsingMergeTree [#CLICKHOUSE-3859] 2018-11-13 16:15:12 +03:00
Nikolai Kochetov
28be6d6443 Review fixes. 2018-11-09 20:23:48 +03:00
Nikolai Kochetov
1e9aeba603 Split ExpressionAnalyzer and SyntaxAnalyzer. 2018-11-09 18:01:18 +03:00
Nikolai Kochetov
726ae0cb9a Split ExpressionAnalyzer and SyntaxAnalyzer. 2018-11-08 19:47:12 +03:00
Nikolai Kochetov
29fe5ea5b6 Review fixes. 2018-11-08 14:17:31 +03:00
Nikolai Kochetov
90120493bf Syntax analyzer (in progress). 2018-11-08 12:06:11 +03:00
Nikolai Kochetov
a5a36d0078 Syntax analyzer (in progress). 2018-11-08 12:01:41 +03:00
Nikolai Kochetov
6ebfd2c42f Syntax analyzer (in progress). 2018-11-08 12:01:12 +03:00
Nikolai Kochetov
748b0f7077 SyntaxAnalyzer (in progress). 2018-11-07 15:44:05 +03:00
Nikolai Kochetov
bcd6e03257 SyntaxAnalyzer (in progress). 2018-11-06 21:13:35 +03:00
Artem Zuikov
eb535c4b9b
Merge pull request #3500 from 4ertus2/joins
refactoring: one place for db and table extraction from AST
2018-11-01 14:59:56 +03:00
alesapin
63c6647be4 Better comment 2018-11-01 14:23:23 +03:00
alesapin
abcc692dbf CLICKHOUSE-4096: Fix nested unaliased joins segfault 2018-11-01 14:23:23 +03:00
chertus
d8674a264a ExpressionAnalyzer fix columns deduplication 2018-10-31 15:58:12 +03:00
chertus
4ff0391ca6 DatabaseAndTableWithAlias - the only place for db & table expraction from AST 2018-10-30 19:31:21 +03:00
chertus
d2518fdb3f more refactoring: funcs to extract database_and_table from AST 2018-10-29 22:04:28 +03:00
chertus
95c618b163 ExpressionAnalyzer: remove duplicated code 2018-10-26 18:13:02 +03:00
chertus
a62fae8332 Merge branch 'master' into joins 2018-10-22 11:25:43 +03:00
chertus
5aedca40c2 fix asan 2018-10-18 22:27:28 +03:00
chertus
a32e06d298 more ExpressionAnalyzer refactoring [CLICKHOUSE-3996] 2018-10-18 18:03:14 +03:00
chertus
5d3f03a6d2 minor refactoring (function naming) 2018-10-17 14:06:46 +03:00
chertus
40f1805bf4 fix gcc build 2018-10-17 13:59:05 +03:00
chertus
27d66a45c3 extract more visitors from ExpressionAnalyzer [CLICKHOUSE-3996] 2018-10-16 22:00:05 +03:00
chertus
4071155043 better ActionsVisitor extraction [CLICKHOUSE-3996] 2018-10-16 15:34:20 +03:00
chertus
9120d5f38e extract visitor from ExpressionAnalyser [CLICKHOUSE-3996] 2018-10-12 18:41:28 +03:00
chertus
c593d9a971 extract ExecuteScalarSubqueriesVisitor from ExpressionAnalyser [CLICKHOUSE-3996] 2018-10-11 22:28:59 +03:00
Alexey Milovidov
2c0ea27377 Miscellaneous #3145 2018-10-10 23:35:21 +03:00
alexey-milovidov
b9ecc4b819
Merge pull request #3340 from CurtizJ/issue-3253
Fix unnecessarily preparations for join at initial server [ISSUE-3253]
2018-10-10 23:04:13 +03:00
CurtizJ
815380b8b2 fix unnecessarily preparations for join at initial server 2018-10-10 20:07:21 +03:00
chertus
1b7354f809 disable AST logging 2018-10-10 19:23:27 +03:00
chertus
ec8d3b388d move DumpASTNode to own file, style fixes [CLICKHOUSE-4001] 2018-10-09 17:32:11 +03:00
chertus
20b733aaf0 Merge branch 'master' into joins 2018-10-09 13:47:01 +03:00
alexey-milovidov
36c3feea80
Merge pull request #3270 from yandex/left-join-right-keys-fix
Left join right keys fix
2018-10-07 23:26:40 +03:00
Nikolai Kochetov
064facd8de Updated test. 2018-10-05 10:43:58 +03:00
alexey-milovidov
b9d1eb4154
Merge pull request #3298 from yandex/fix-prewhere-with-altered-columns
Fix prewhere with altered columns
2018-10-04 23:57:11 +03:00
Nikolai Kochetov
b1fa3fab9d Fix prewhere whith final. #2827 2018-10-04 21:18:54 +03:00
Nikolai Kochetov
c4c14de02f Join aliases and duplicating columns fixes.
Join aliases and duplicating columns fixes. [#CLICKHOUSE-3994] #3145
2018-10-02 21:17:39 +03:00
chertus
69b9c25801 Merge branch 'master' into joins 2018-09-28 20:09:05 +03:00
chertus
59df909f87 more ast debug info 2018-09-28 18:01:13 +03:00
chertus
b4ea89e1f3 minor fix 2018-09-28 14:46:52 +03:00
chertus
669ab71502 rename files according to class name 2018-09-28 13:52:08 +03:00
Nikolai Kochetov
97add69825 Rename WithDictionary to LowCardinality. 2018-09-28 13:44:59 +03:00
chertus
57d2c9db60 AST debug stuff: DumpASTNode, TranslateQualifiedNamesVisitor, hide AST explain command [CLICKHOUSE-4001] 2018-09-27 22:25:18 +03:00
zhang2014
b887ec8e98 ISSUES-3145 support qualified asterisk 2018-09-25 10:42:51 +08:00
zhang2014
f3dcc2ef41 ISSUES-3145 support qualified asterisk 2018-09-24 23:28:18 +08:00
alexey-milovidov
b1eb66c03e
Merge branch 'master' into low-cardinality-fixes 2018-09-21 13:43:37 +03:00
chertus
6442b5b167 refactoring: hide ASTIdentifier kind 2018-09-20 16:13:33 +03:00