Nikolai Kochetov
7da72261a2
Merge branch 'master' into try-to-remove-dry-run
2019-08-16 15:50:48 +03:00
alexey-milovidov
a466c7aebd
Merge pull request #6299 from CurtizJ/order-by-efficient
...
Optimizations of ranges selection while reading with enabled optimize_read_in_order.
2019-08-16 02:39:53 +03:00
CurtizJ
00d98c51c3
fix limit without order
2019-08-15 14:09:41 +03:00
CurtizJ
6ef3b5f9c7
fix usage of global syntax_result in optimizeReadInOrder
2019-08-15 13:15:04 +03:00
Nikolai Kochetov
90cb316457
Added more comments. Fix operator== in ExpressionActions.
2019-08-15 12:51:53 +03:00
Nikolai Kochetov
09dfc26087
Remove _dummy column at InterpreterSelectQuery::unifyStreams.
2019-08-15 11:50:17 +03:00
chertus
7c566f317c
refactoring: extract SelectQueryExpressionAnalyzer from ExpressionAnalyzer
2019-08-14 22:30:30 +03:00
CurtizJ
0b3d7d8032
Merge remote-tracking branch 'upstream/master' into order-by-efficient
2019-08-14 21:26:25 +03:00
CurtizJ
a785d4a435
Merge branch 'master' of https://github.com/yandex/ClickHouse into merging_with_ties_and_with_fill
2019-08-14 20:24:47 +03:00
CurtizJ
72b80fe1f7
merging with master
2019-08-14 20:01:47 +03:00
CurtizJ
eb3a3f44d0
better avoiding of array join in optimizeReadInOrder
2019-08-14 19:15:03 +03:00
Nikolai Kochetov
b323f08907
Fix build.
2019-08-14 18:23:57 +03:00
Nikolai Kochetov
287eb633b8
Merged with master
2019-08-14 18:16:52 +03:00
Nikolai Kochetov
b5c9be75c4
Materialize constant keys in header.
2019-08-14 18:14:32 +03:00
Nikolai Kochetov
0635188104
Allow constants for RemoteBlockInputStream.
2019-08-14 18:14:32 +03:00
Nikolai Kochetov
e10f198d72
Fix build.
2019-08-14 18:14:32 +03:00
CurtizJ
22d9bd06cc
Merge branch 'dmitriiut-WITH_TIES_and_WITH_FILL' of https://github.com/dmitriiut/ClickHouse into merging_with_ties_and_with_fill
2019-08-14 16:40:07 +03:00
CurtizJ
d44d2d1731
rewrite trash code in optimizeReadInOrder and disable read in order optimization with joins
2019-08-14 15:29:21 +03:00
CurtizJ
94bca8315d
Merge remote-tracking branch 'upstream/master' into order-by-efficient
2019-08-14 01:41:38 +03:00
chertus
15d2561ac8
more ExpressionAnalyzer refactoring
2019-08-12 22:27:09 +03:00
alexey-milovidov
8520288044
Merge pull request #6416 from 4ertus2/some
...
Refactoring: move collectUsedColumns() to SyntaxAnalyzer
2019-08-11 05:16:22 +03:00
alexey-milovidov
838c5e535f
Merge pull request #6433 from yandex/prevent-stack-overflow-in-parser
...
Fixed possible stack overflow in parser
2019-08-10 23:58:54 +03:00
Alexey Milovidov
afef5c6c70
Added stack protection; added a test
2019-08-10 20:51:47 +03:00
kreuzerkrieg
112fc71276
adding -Wshadow for GCC
2019-08-09 23:58:16 +03:00
Nikolai Kochetov
9bd949fff5
Convert streams structure to sample block in InterpreterSelectQuery.
2019-08-09 17:57:15 +03:00
chertus
e06c994b0e
refactoring: move collectUsedColumns from ExpressionAnalyzer to SyntaxAnalyzer
2019-08-09 17:50:04 +03:00
Nikolai Kochetov
78516083ac
Remove dry_run flag from InterpreterSelectQuery::executeImpl.
2019-08-09 16:42:58 +03:00
Nikolai Kochetov
a1023bebff
Fix tests.
2019-08-09 16:37:42 +03:00
Nikolai Kochetov
9ac401573f
Added InterpreterSelectQuery::getSampleBlockImpl. Disable dry_run.
2019-08-08 18:18:28 +03:00
Nikolai Kochetov
42c2833932
Added function which calculates header for execution step (InterpreterSelectQuery::getHeaderForExecutionStep). Removed InterpreterSelectQuery:;getSampleBlock from StorageDistributed and StorageMerge.
2019-08-07 16:41:36 +03:00
Nikolai Kochetov
e73ea8a131
Make InterpreterSelectQuery::analyzeExpressions static.
2019-08-06 16:00:56 +03:00
CurtizJ
cfe32ad89b
Merge remote-tracking branch 'upstream/master' into order-by-efficient
2019-08-04 21:43:00 +03:00
Alexey Milovidov
8b85e09f06
Removed useless includes
2019-08-04 03:34:43 +03:00
Alexey Milovidov
8b8c59d71b
Simplification of #3796
2019-08-04 03:29:32 +03:00
Alexey Milovidov
224bc4df97
Minor modifications + a comment #3796
2019-08-04 03:12:17 +03:00
alexey-milovidov
b045e85469
Merge pull request #3796 from amosbird/hang
...
Fix materialized view with column defaults.
2019-08-04 03:06:40 +03:00
CurtizJ
e06a53a5d9
fix ranges selection at reading in order
2019-08-02 20:34:29 +03:00
CurtizJ
5f7ebb18ed
more optimal ranges selection at reading in order
2019-08-02 19:16:18 +03:00
Amos Bird
6db1c02bfd
Fix materialized view with column defaults.
...
https://github.com/yandex/ClickHouse/issues/448
https://github.com/yandex/ClickHouse/issues/3484
https://github.com/yandex/ClickHouse/issues/3450
https://github.com/yandex/ClickHouse/issues/2878
https://github.com/yandex/ClickHouse/issues/2285
2019-07-30 10:49:54 +08:00
CurtizJ
d69d68f065
rename setting 'optimize_pk_order' and some functions
2019-07-28 04:16:56 +03:00
CurtizJ
60289cd764
fix optimizeSortingWithPK
2019-07-27 03:15:22 +03:00
CurtizJ
cb85721cba
handle ExpressionAnalyzer exceptions, while trying to optimize order by, in case of complicated queries
2019-07-27 03:02:04 +03:00
CurtizJ
b1d981ec3a
better pipeline while reading in pk_order
2019-07-27 01:18:27 +03:00
qianlixiang
64d65c0123
Fixed mismatched header of prewhere with sample column
2019-07-26 18:48:42 +08:00
CurtizJ
b1cc019bd4
fix pipeline
2019-07-25 14:00:14 +03:00
CurtizJ
f5b93eb991
fix order by optimization
2019-07-25 13:45:01 +03:00
CurtizJ
3d706ec20e
support 'order by' optimiation with simple monotonic functions
2019-07-24 17:23:57 +03:00
CurtizJ
2797c16930
fix prewhere at fetching columns
2019-07-19 13:14:27 +03:00
CurtizJ
b9dc472071
Merge remote-tracking branch 'upstream/master' into order-by-efficient
2019-07-19 01:09:59 +03:00
CurtizJ
a3d25790bd
basic implementation of reading in pk order and 'order by' optimization
2019-07-18 17:41:11 +03:00
CurtizJ
410b62f7fa
Merge branch 'clickhouse-4013' of https://github.com/anrodigina/ClickHouse into order-by-efficient
2019-07-05 13:48:04 +03:00
Nikolai Kochetov
f9b29bfdd2
Merged with master.
2019-06-25 20:00:54 +03:00
Nikolai Kochetov
b2a3835195
Unify streams for SourceFromInputStream.
2019-06-25 19:41:06 +03:00
Nikolai Kochetov
821d520a52
Fix limit by offset.
2019-06-25 19:41:06 +03:00
Nikolai Kochetov
96174e90b0
Fix build.
2019-06-25 19:41:00 +03:00
alexey-milovidov
606b074a4b
Merge pull request #5659 from yandex/ignore-mutation-limits
...
Ignore query execution limits and limits for max parts size for merge while executing mutations.
2019-06-21 02:14:41 +03:00
CurtizJ
6d9cbc6f28
ignore query limits from system profile while executing mutations
2019-06-14 22:27:53 +03:00
Alexey Milovidov
c846d0f6af
Namespace comments are unneeded according to the code style.
...
find dbms -name '*.h' -or -name '*.cpp' | xargs grep -l -P '}\s*//+\s*namespace\s*' | xargs sed -i -r -e 's/}\s*\/\/+\s*namespace\s*.*$/}/'
2019-06-13 13:43:37 +03:00
Anastasiya Rodigina
4ff02cff4d
Fix some problems with tests, add more tests, more syntetic tests are coming today
2019-06-03 06:00:54 +00:00
Anastasiya Rodigina
6c779e63b0
Edit reverse order
2019-05-25 14:09:23 +03:00
chertus
9eca696e82
actualize isNumber for Decimal
2019-05-24 15:11:03 +03:00
Anastasiya Rodigina
c8d4952702
Fix test with order by and final, need to think about it
2019-05-18 21:13:18 +03:00
Anastasiya Rodigina
b3d811a199
Fix some tests
2019-05-18 19:46:29 +03:00
Anastasiya Rodigina
63a56f4bd9
Fix tests with group by
2019-05-18 15:54:04 +03:00
Nikolai Kochetov
808d0f3b08
Merged with master.
2019-05-14 13:31:19 +03:00
Anastasiya Rodigina
af4fff970b
Revert "Changes in read in pk_order, UnionBlockInputStream and InterpreterSelectQuery"
...
This reverts commit 61d49e1e5f
.
2019-05-10 23:22:45 +03:00
Anastasiya Rodigina
61d49e1e5f
Changes in read in pk_order, UnionBlockInputStream and InterpreterSelectQuery
2019-05-10 22:09:15 +03:00
Anastasiya Rodigina
23a8efe367
Fix tests and change pipeline
2019-05-09 18:44:51 +03:00
alexey-milovidov
e1158f53ad
Update InterpreterSelectQuery.cpp
2019-05-05 23:29:17 +03:00
alexey-milovidov
125fce3303
Update InterpreterSelectQuery.cpp
2019-05-05 23:27:03 +03:00
alexey-milovidov
c04c614bc0
Merge branch 'master' into clickhouse-4013
2019-05-05 23:22:45 +03:00
Alexey Milovidov
a6ca9f266f
Removed huge chunk of bad code
2019-05-03 05:00:57 +03:00
Nikolai Kochetov
b8adb0937f
Do not create processors for totals stream.
2019-04-30 20:37:30 +03:00
Nikolai Kochetov
43adf33ec2
Do not create processors for totals stream.
2019-04-30 20:30:19 +03:00
Nikolai Kochetov
f170e55ebd
Do not create processors for totals stream.
2019-04-30 20:20:34 +03:00
Nikolai Kochetov
1410d1a1ae
Do not create processors for totals stream.
2019-04-30 20:06:41 +03:00
Nikolai Kochetov
728e8dfc26
Do not create processors for totals stream.
2019-04-30 20:04:31 +03:00
Nikolai Kochetov
72c0530845
Do not create processors for totals stream.
2019-04-30 20:01:12 +03:00
CurtizJ
7766f5c0c3
added offset for limit by
2019-04-29 16:12:39 +03:00
Nikolai Kochetov
0b8107c497
Fix totals with rollup.
2019-04-29 13:00:17 +03:00
Anastasiya Rodigina
e750755f8f
Add comments and edit style
2019-04-27 14:59:08 +03:00
Anastasiya Rodigina
747d2e0d3a
Change pipeline + add optimize stuff into Settings.h
2019-04-27 12:39:03 +03:00
dmitriiut
a2c3fd2057
bug fixes
2019-04-23 04:48:51 +03:00
dmitriiut
50c322bc6d
WITH FILL version
2019-04-22 02:04:23 +03:00
dmitriiut
3c2922c406
Merge branch 'master' into dmitriiut-WITH_TIES_and_WITH_FILL
2019-04-21 19:37:38 +03:00
dmitriiut
e94575e1da
fix progress
2019-04-21 19:16:25 +03:00
dmitriiut
8a7853b0a8
parser WITH FILL
...
some interpreter changes
2019-04-21 06:36:59 +03:00
dmitriiut
2e0374fbd4
fix WITH TIES
2019-04-21 05:33:03 +03:00
dmitrii
a130850e15
limit with ties
2019-04-19 16:38:25 +03:00
Nikolai Kochetov
745beb6080
Fix rollup and cube transforms.
2019-04-18 15:43:13 +03:00
Ivan
118bea2be6
Enable predicate push-down optimization by default. ( #4846 )
...
* Enable predicate push-down optimization by default.
* Forbid push-downs for some JOIN cases.
* Fix existing tests
* Forbid optimization if a select query has ARRAY JOIN on any side.
2019-04-18 13:39:25 +03:00
Anastasiya Rodigina
ef0be2a721
Fix build and style issues
2019-04-18 01:58:24 +03:00
Anastasiya Rodigina
0c1735f1b1
ReverseBlockInputStream, optimization of group by, tests
2019-04-18 00:20:51 +03:00
Nikolai Kochetov
d5f878dba3
Fix totals.
2019-04-17 18:35:22 +03:00
Nikolai Kochetov
87472146b3
Fix totals.
2019-04-17 17:56:46 +03:00
Nikolai Kochetov
323f742c1b
Fix totals.
2019-04-17 17:54:44 +03:00
Nikolai Kochetov
647afb65e8
Fix totals.
2019-04-17 17:38:16 +03:00
chertus
950f8a7042
fix distinct with join
2019-04-12 20:04:38 +03:00
Nikolai Kochetov
6949f2d80a
Added force_add_agg_info to SourceFromInputStream/
2019-04-12 16:16:07 +03:00
Nikolai Kochetov
1e5731496c
Added force_add_agg_info to SourceFromInputStream.
2019-04-12 16:09:46 +03:00
Nikolai Kochetov
d1840417a8
Don't resize pipeline before memory efficient transform.
2019-04-11 17:28:42 +03:00
Nikolai Kochetov
a72f402468
Fix double readPrefix call.
2019-04-11 16:04:43 +03:00
Nikolai Kochetov
403df591dc
Fix totals fro single remote source.
2019-04-10 19:34:20 +03:00
Nikolai Kochetov
d7aa7412ae
Fix totals fro single remote source.
2019-04-10 19:28:37 +03:00
Nikolai Kochetov
c4c98c3a99
Fix full join.
2019-04-10 17:01:52 +03:00
Nikolai Kochetov
94305c41e3
Fix join for totals.
2019-04-10 14:04:56 +03:00
Nikolai Kochetov
31ed0f0e38
Fix join for totals.
2019-04-10 13:52:20 +03:00
chertus
9329410012
fix use after move
2019-04-09 17:59:06 +03:00
Nikolai Kochetov
59eae7b23d
Fix join for totals.
2019-04-09 17:51:38 +03:00
chertus
82dc1fb1db
rewrite ASTSelectQuery (consistent children)
2019-04-09 17:22:35 +03:00
Nikolai Kochetov
322b1ccd6b
Fix join for totals.
2019-04-09 17:08:52 +03:00
Nikolai Kochetov
54066fc312
Fix rows_before_limit_at_least.
2019-04-09 13:17:25 +03:00
Nikolai Kochetov
33b176f2da
Fix style.
2019-04-05 14:34:11 +03:00
Nikolai Kochetov
1470fe0a72
Fix clang build.
2019-04-05 14:27:08 +03:00
Nikolai Kochetov
7626b1b267
Multiple fixes.
2019-04-05 13:52:07 +03:00
chertus
6b49900e1a
Asterisks for multiple joins CLICKHOUSE-4372
2019-04-03 19:06:05 +03:00
Nikolai Kochetov
5e39ec610c
Merged with master
2019-04-03 14:21:38 +03:00
Nikolai Kochetov
94ff7f694a
QueryPipeline [in progress].
2019-04-03 13:14:36 +03:00
Ivan
957d23267b
Minimal implementation of row-level security CLICKHOUSE-4315 ( #4792 )
...
For detailed description see the related PR
2019-03-29 23:31:06 +03:00
chertus
7561ff2ab7
fix dups in GLOBAL JOIN with asterisks
2019-03-18 17:56:33 +03:00
chertus
bd559f8db8
SelectQueryOptions v3 (no inheritance)
2019-03-18 15:05:51 +03:00
chertus
b6e2697101
Merge branch 'master' into ast
2019-03-18 13:36:13 +03:00
Alexey Zatelepin
304c67da99
Merge branch 'master' into fix-add-materialized-column-after
...
Conflicts:
dbms/src/Interpreters/InterpreterCreateQuery.cpp
dbms/src/Interpreters/InterpreterDescribeQuery.cpp
dbms/src/Interpreters/interpretSubquery.cpp
dbms/src/Storages/ColumnsDescription.cpp
2019-03-17 00:46:53 +03:00
alexey-milovidov
ae2d974dda
Merge pull request #4708 from kvap/distributed-limit-by
...
Make the query planner respect LIMIT BY in remote queries
2019-03-16 20:54:06 +03:00
Alexey Zatelepin
b5a0a3fa23
store all kinds of columns in the same list in ColumnsDescription [#CLICKHOUSE-3101]
2019-03-15 19:37:52 +03:00
Ivan Lezhankin
4f6a494af8
Revert references where they were before refactoring.
2019-03-15 19:14:13 +03:00
chertus
ffc3974934
SelectQueryOptions v2
2019-03-15 18:57:18 +03:00
Constantin S. Pan
df6860d5e0
Make the query planner respect LIMIT BY in remote queries
2019-03-15 15:26:21 +00:00
chertus
53abdccb95
refactoring: extract SelectQueryOptions
2019-03-15 16:49:58 +03:00
Ivan Lezhankin
39f7225bd4
Fix build after merge
2019-03-12 17:07:02 +03:00
Ivan Lezhankin
4c1a0ca255
Merge remote-tracking branch 'upstream/master' into iast-as
2019-03-12 15:51:18 +03:00
alexey-milovidov
a4e9c59aa3
Merge pull request #4648 from 4ertus2/joins
...
Refactoring: move JOIN conversions to InterpreterSelectQuery
2019-03-11 22:17:58 +03:00
Ivan Lezhankin
a3a8b2bbf7
Include IAST_fwd.h for using ASTPtr
2019-03-11 17:01:45 +03:00
Ivan Lezhankin
d1ead22073
Rename As<…> → as<…>
2019-03-11 16:22:51 +03:00
Ivan Lezhankin
1e9f7847dc
Merge remote-tracking branch 'upstream/master' into iast-as
2019-03-11 16:11:22 +03:00
chertus
c089d5b88a
CrossToInnerJoinVisitor before JoinToSubqueryTransformVisitor
2019-03-11 16:08: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
chertus
04f5584d72
move JOIn convertions to InterpreterSelectQuery
2019-03-11 15:20:55 +03:00
chertus
09a3b24cbc
join kind helpers
2019-03-11 14:14:09 +03:00
Ivan Lezhankin
0e325c7a4a
Replace const typeid_casts with As<Derived>() method invocations
2019-03-08 12:48:20 +03:00
Alexey Zatelepin
3344955154
separate Read and Write lock holders, better method names
2019-03-07 21:10:21 +03:00
zhang2014
fb44b6692a
rename setting name
2019-03-04 10:09:44 +08:00
zhang2014
b696ef34d2
Add max_execution_speed & min_execution_bytes_speed & max_execution_bytes_speed
2019-03-02 15:08:02 +08:00
alexey-milovidov
ee903886e6
Merge pull request #4387 from abyss7/CLICKHOUSE-4268
...
Improve push-down logic for joined statements
2019-03-02 04:19:50 +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
Ivan Lezhankin
c8eefb3927
Always modify subqueries if modifying inplace
...
to support push-down while analyzing.
2019-02-26 13:18:12 +03:00
Ivan Lezhankin
0a443399a0
Implement the debug query "ANALYZE"
...
that prints out the query after syntax analysis.
Should be helpful for tests.
2019-02-26 13:17:25 +03:00
Alexey Milovidov
58a6accee5
Updated test #4246
2019-02-10 19:55:12 +03:00
Alexey Milovidov
d22b52b933
Allow constant expressions in LIMIT BY and TOP; fixed error #4246
2019-02-10 18:27:27 +03:00
Alexey Milovidov
c603d270f4
Cleanups #4246
2019-02-10 18:17:45 +03:00