Amos Bird
35961c0c5d
Use ActionsDAG to rewrite projection queries
2021-05-11 18:12:27 +08:00
Amos Bird
ebaf42a448
Reformat and fix some tests
2021-05-11 18:12:27 +08:00
Amos Bird
264cff6415
Projections
...
TODO (suggested by Nikolai)
1. Build query plan fro current query (inside storage::read) up to WithMergableState
2. Check, that plan is simple enough: Aggregating - Expression - Filter - ReadFromStorage (or simplier)
3. Check, that filter is the same as filter in projection, and also expression calculates the same aggregation keys as in projection
4. Return WithMergableState if projection applies
3 will be easier to do with ActionsDAG, cause it sees all functions, and dependencies are direct (but it is possible with ExpressionActions also)
Also need to figure out how prewhere works for projections, and
row_filter_policies.
wip
2021-05-11 18:12:23 +08:00
Ivan
495c6e03aa
Replace all Context references with std::weak_ptr ( #22297 )
...
* Replace all Context references with std::weak_ptr
* Fix shared context captured by value
* Fix build
* Fix Context with named sessions
* Fix copy context
* Fix gcc build
* Merge with master and fix build
* Fix gcc-9 build
2021-04-11 02:33:54 +03:00
Alexey Milovidov
a0a3380d91
Remove useless headers
2021-03-28 22:46:45 +03:00
Anton Popov
a4c00ab5dc
Merge pull request #21303 from ucasFL/forbid
...
Forbid to drop a column if it's referenced by materialized view
2021-03-03 02:55:06 +03:00
feng lv
a26c9e64a9
fix
...
fix
2021-03-02 03:20:03 +00:00
Denis Glazachev
eb80c189e4
Merge branch 'master' into row-policy-with-prewhere
2021-02-28 20:14:31 +04:00
feng lv
51021c1164
forbid to drop a column if it's referenced by materialized view
2021-02-28 05:24:39 +00:00
alesapin
5c6c318737
Restrict mutations for engines which doesn't support them
2021-02-25 13:07:48 +03:00
Denis Glazachev
79592b73f8
Store filter info in prewhere info instead of multiple prewheres
...
Some cleanups
2021-02-14 02:07:13 +04:00
Alexander Kuzmenkov
22a0edc596
Update IStorage.cpp
2020-12-23 09:44:44 +03:00
Alexander Kuzmenkov
51b2329295
Merge branch 'master' into aku/window-prototype
2020-12-23 09:26:11 +03:00
Alexander Kuzmenkov
132a0b42eb
cleanup
2020-12-18 20:13:28 +03:00
fastio
e7bce63d3a
hints for column names
2020-12-15 20:23:31 +08:00
Alexander Kuzmenkov
8ee86e35d2
debug
2020-12-02 21:16:31 +03:00
Nikolai Kochetov
195c941c4e
Merge branch 'master' into storage-read-query-plan
2020-11-10 15:02:22 +03:00
alesapin
72046313d4
Merge branch 'master' into nvartolomei-drop-part
2020-11-09 10:02:02 +03:00
alesapin
67d22b3e57
Merge branch 'master' into nvartolomei-drop-part
2020-11-02 19:09:09 +03:00
Azat Khuzhin
b838214a35
Pass non-const SelectQueryInfo (and drop mutable qualifiers)
2020-10-02 22:42:35 +03:00
Nikolai Kochetov
576ffadb17
Fix explain for ISourceStep.
2020-09-30 15:22:30 +03:00
Nikolai Kochetov
b26f11c00c
Support StorageDistributed::read for QueryPlan.
2020-09-18 17:16:53 +03:00
Nikolai Kochetov
50674a320f
Refactor IStorage::read with query plan.
2020-09-18 14:39:07 +03:00
roman
b41421cb1c
[settings]: introduce new query complexity settings for leaf-nodes
...
The new setting should allow to control query complexity on leaf nodes
excluding the final merging stage on the root-node. For example, distributed
query that reads 1k rows from 5 shards will breach the `max_rows_to_read=5000`,
while effectively every shard reads only 1k rows. With setting `max_rows_to_read_leaf=1500`
this limit won't be reached and query will succeed since every shard reads
not more that ~1k rows.
2020-09-17 10:37:05 +01:00
Nikolai Kochetov
6eac433c55
Review fixes.
2020-09-15 13:40:39 +03:00
Nikolai Kochetov
bcfc83022a
Return query plan from storage.
2020-09-14 17:13:58 +03:00
Nicolae Vartolomei
97d0b5ab23
Remove unused query argument
2020-09-08 10:56:10 +01:00
Nikolai Kochetov
9b67cd9faf
Merge branch 'master' into refactor-pipes-3
2020-08-10 10:50:17 +03:00
Alexey Milovidov
edd89a8610
Fix half of typos
2020-08-08 03:47:03 +03:00
Nikolai Kochetov
09fbce1b1e
Merge branch 'master' into refactor-pipes-3
2020-08-04 11:32:34 +03:00
Nikolai Kochetov
e411916bde
Refactor Pipe [part 1].
2020-08-03 14:33:11 +03:00
Vitaly Baranov
18b21511a9
Merge pull request #13013 from vitlibar/implement-custom-settings
...
Implement custom settings
2020-08-02 05:01:14 +03:00
Vitaly Baranov
30b34e6a15
Use SettingSeconds only in Settings, use std::chrono::seconds in other places.
2020-07-31 19:11:27 +03:00
Nikolai Kochetov
39530f837e
Remove TreeExecutorBlockInputStream.
2020-07-31 16:23:19 +03:00
alesapin
1f576ee039
Some intermediate solution
2020-07-13 20:27:52 +03:00
alesapin
4a53264a86
Remove redundant and duplicated code
2020-07-13 19:19:08 +03:00
alesapin
b3ee8967dc
Fix style
2020-06-18 19:28:20 +03:00
alesapin
d79982f497
Better locks in Storages
2020-06-18 19:10:47 +03:00
alesapin
1a69c3234a
Fix style
2020-06-18 14:09:55 +03:00
alesapin
dffdece350
getColumns in StorageInMemoryMetadta (only compilable)
2020-06-17 19:39:58 +03:00
alesapin
ef8781cce7
Better getVirtuals method
2020-06-17 17:37:21 +03:00
alesapin
33c27de54d
Check methods in metadata
2020-06-17 17:32:25 +03:00
alesapin
31abbe5dbd
Select query in metadata
2020-06-17 17:06:22 +03:00
alesapin
eaaef83742
Settings changes in StorageInMemoryMetadata
2020-06-17 16:46:01 +03:00
alesapin
ed8f3b2fc4
TTL in storage in memory metadata
2020-06-17 16:39:26 +03:00
alesapin
1afdebeebd
Primary key in storage metadata
2020-06-17 15:39:20 +03:00
alesapin
1da393b218
Sampling key in StorageInMemoryMetadata
2020-06-17 15:07:09 +03:00
alesapin
ba04d02f1e
Compilable sorting key in metadata
2020-06-17 14:05:11 +03:00
alesapin
ab61abccc1
Partition key in StorageInMemoryMetadata
2020-06-17 13:34:23 +03:00
alesapin
62f2c17a66
Secondary indices in StorageInMemoryMetadata
2020-06-17 12:38:47 +03:00