Luck-Chang
1ac8e739c9
fix some typos and clang-tidy warnings
2022-09-05 09:50:24 +08:00
Nikolai Kochetov
6919ae7c91
Fixing a test with indexHint
2022-07-28 12:24:16 +00:00
Anton Popov
d5d568e235
Merge pull request #37913 from azat/parts-refcnt
...
Fix refcnt for unused MergeTree parts in SELECT queries
2022-06-21 22:56:26 +02:00
Dmitry Novik
0663f07e67
Rework expressions with window functions
2022-06-16 13:29:56 +00:00
Azat Khuzhin
61a2613127
Fix refcnt for unused MergeTree parts in SELECT queries
...
Before this patch SELECT queries hold parts even if they were not
required by select (had been eliminated by partition pruning).
This defers removing parts if you have long running queries.
This had been introduced in #23932 , with introduction of
StorageSnapshotPtr.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-08 07:04:53 +03:00
taiyang-li
c7e68d664d
fix building
2022-05-24 10:58:45 +08:00
taiyang-li
fd878f7e7b
change as requested
2022-05-10 12:06:50 +08:00
Anton Popov
fcdebea925
Merge remote-tracking branch 'upstream/master' into HEAD
2022-02-25 13:41:30 +03:00
mergify[bot]
dd947f964c
Merge branch 'master' into mv_cacheable_scalars
2022-02-07 10:07:26 +00:00
Anton Popov
78b9f15abb
Merge remote-tracking branch 'upstream/master' into HEAD
2022-01-30 03:24:37 +03: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
Azat Khuzhin
97acf190ed
Replace old _shard_num implementation with shardNum() function
...
_shard_num via constant identifier (from #7624 ) has too much issues,
take a look at #16947 for example.
shardNum() function (from #27020 ) should works better.
This changes the behaviour of _shard_num slightly, now it returns nested
shard number in case of nested distributed tables (Distributed over
Distributed), but this should be minor.
v2: Rewrite _shard_num to shardNum() in TreeRewriter
2022-01-10 21:21:24 +03:00
Anton Popov
a20922b2d3
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-11-09 15:36:25 +03:00
vdimir
039af96b61
Set execute_scalar_subqueries in MutationsInterpreter only for MergeTree and prepareInterpreterSelectQuery
2021-10-21 18:05:46 +03:00
vdimir
ed0bb2cec2
Fix deadlock on ALTER with scalar subquery to the same table
2021-10-21 14:02:51 +03:00
vdimir
3443b3b5c4
Separate functoin buildJoinedPlan, minor refactoring
2021-08-31 15:27:44 +03:00
Anton Popov
3ed7f5a6cc
dynamic subcolumns: add snapshot for storage
2021-07-09 06:15:41 +03:00
Amos Bird
0f7728cd5e
Fix RBAC test again
2021-06-17 23:00:03 +08:00
Amos Bird
aaac231c6a
Record expanded aliases for RBAC
2021-06-15 18:28:13 +08:00
alexey-milovidov
05d1af153c
Merge branch 'master' into rename-const-context-ptr
2021-06-12 03:25:09 +03:00
alesapin
11a1606c15
Less strict
2021-06-08 12:54:00 +03:00
alesapin
5284f192ee
Ban loop aliases in table definitions
2021-06-07 23:59:38 +03:00
Nikolai Kochetov
dbaa6ffc62
Rename ContextConstPtr to ContextPtr.
2021-06-01 15:20:52 +03:00
Alexander Kuzmenkov
3f57fc085b
remove mutable context references from functions interface
...
Also remove it from some visitors.
2021-05-28 19:45:37 +03: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
Amos Bird
69204e1d21
Add prefer_column_name_to_alias settings ( #22044 )
2021-03-30 16:51:45 +03:00
alexey-milovidov
d2366b5c6c
Merge pull request #18233 from vitlibar/fix-access-rights-for-select-count
...
Fix access rights for SELECT count()
2021-01-17 00:12:08 +03:00
sundyli
f8815f233c
Merge branch 'master' into alias_column_partition_prune
2021-01-02 11:23:55 +08:00
Vitaly Baranov
235ea220ec
SELECT count() FROM table now requires at least one column to be accessible in the table.
2020-12-30 15:00:08 +03:00
Alexander Kuzmenkov
52ace7a3d1
one plan step per window
2020-12-22 04:37:45 +03:00
sundyli
36ca21c24a
Merge branch 'master' into alias_column_partition_prune
2020-12-13 00:45:14 +08:00
sundy-li
9407028540
update
2020-12-13 00:42:15 +08:00
Alexander Kuzmenkov
eb0c817bf2
expression analyzer part
2020-12-09 14:14:40 +03:00
Anton Popov
1e24d6085a
fix performance with Merge table over huge number of MergeTree tables
2020-11-13 18:56:25 +03:00
Artem Zuikov
2afd123eda
Refactoring: extract TreeOptimizer from SyntaxAnalyzer ( #12645 )
2020-07-22 20:13:05 +03:00