Azat Khuzhin
b838214a35
Pass non-const SelectQueryInfo (and drop mutable qualifiers)
2020-10-02 22:42:35 +03:00
Azat Khuzhin
587cde853e
Avoid skipping unused shards twice (for query processing stage and read itself)
2020-10-02 22:42:09 +03:00
Alexey Milovidov
24b334258b
Resolve review comment
2020-09-18 22:25:56 +03:00
Alexey Milovidov
e1ffa07a39
Resolve review comments
2020-09-18 22:08:53 +03:00
Alexey Milovidov
7fb4dfea2c
Small improvements for IStorage::rename
2020-09-17 22:50:43 +03:00
alexey-milovidov
84eece69ba
Merge pull request #14876 from amosbird/ns
...
Get rid of query settings after initialization.
2020-09-17 17:49:25 +03:00
Amos Bird
96a202c0fb
Get rid of query settings after initialization.
2020-09-16 22:35:39 +08:00
Pavel Kovalenko
01ab28a182
Don't throw exception if Distributed storage has multi-volume storage policy configuration.
2020-09-15 12:26:56 +03:00
alexey-milovidov
edea940e17
Update StorageDistributed.cpp
2020-09-03 04:39:36 +03:00
Azat Khuzhin
fffeeeba06
Force WithMergeableStateAfterAggregation via distributed_group_by_no_merge (convert to UInt64)
...
Possible values:
- 1 - Do not merge aggregation states from different servers for distributed query processing - in case it is for certain that there are different keys on different shards.
- 2 - same as 1 but also apply ORDER BY and LIMIT stages
2020-09-03 00:52:51 +03:00
Azat Khuzhin
10b4f3b41f
Optimize queries with LIMIT/LIMIT BY/ORDER BY for distributed with GROUP BY sharding_key
...
Previous set of QueryProcessingStage does not allow to do this.
But after WithMergeableStateAfterAggregation had been introduced the
following queries can be optimized too under
optimize_distributed_group_by_sharding_key:
- GROUP BY sharding_key LIMIT
- GROUP BY sharding_key LIMIT BY
- GROUP BY sharding_key ORDER BY
And right now it is still not supports:
- WITH TOTALS (looks like it can be supported)
- WITH ROLLUP (looks like it can be supported)
- WITH CUBE
- SETTINGS extremes=1 (looks like it can be supported)
But will be implemented separatelly.
vX: fixes
v2: fix WITH *
v3: fix extremes
v4: fix LIMIT OFFSET (and make a little bit cleaner)
v5: fix HAVING
v6: fix ORDER BY
v7: rebase against 20.7
v8: move out WithMergeableStateAfterAggregation
v9: add optimize_distributed_group_by_sharding_key into test names
2020-09-03 00:52:51 +03:00
Nikolai Kochetov
2cca4d5fcf
Refactor Pipe [part 2].
2020-08-03 16:54:14 +03:00
Vladimir Chebotarev
faedb04722
Minor fixes.
2020-07-28 19:45:46 +03:00
Vladimir Chebotarev
1b3f5c99f5
Real fix of test.
2020-07-26 21:27:36 +03:00
Vladimir Chebotarev
f5af64514f
Test fix (removed redundant code).
2020-07-26 21:27:36 +03:00
Vladimir Chebotarev
8039d45910
Minor fix in StorageDistributed
.
2020-07-26 21:27:36 +03:00
Gleb Novikov
7f5b6fba78
Generic volume is coming...
...
1. SingleDiskVolume for temporary volumes
2. Generic VolumePtr in StoragePolicies
3. Removed max_data_part_size in system.storage_policies, added volume_type
2020-07-26 21:27:36 +03:00
Artem Zuikov
2afd123eda
Refactoring: extract TreeOptimizer from SyntaxAnalyzer ( #12645 )
2020-07-22 20:13:05 +03:00
Azat Khuzhin
6ea1b19476
Remove data for Distributed tables (blocks from async INSERTs) on DROP TABLE
2020-07-17 08:59:57 +03:00
Azat Khuzhin
9c94993f14
Fix "Sharding key is not deterministic" message
2020-06-29 23:00:14 +03:00
alexey-milovidov
18eb141ea1
Merge pull request #11715 from azat/dist-optimize_skip_unused_shards-fixes
...
Control nesting level for shards skipping and disallow non-deterministic functions
2020-06-24 12:54:58 +03:00
alesapin
c9fa5d2ec3
Better naming
2020-06-19 18:39:41 +03:00
Azat Khuzhin
d34e6217bc
Add logging of adjusting conditional settings for distributed queries
2020-06-18 21:49:29 +03:00
Azat Khuzhin
041533eae2
Disable optimize_skip_unused_shards if sharding_key has non-deterministic func
...
Example of such functions is rand()
And this patch disables only optimize_skip_unused_shards, i.e. INSERT
code path does not changed, so it will work as before.
2020-06-18 21:49:29 +03:00
alesapin
d79982f497
Better locks in Storages
2020-06-18 19:10:47 +03:00
alesapin
aab4ce6394
Truncate with metadata
2020-06-18 13:29:13 +03:00
alesapin
760e9a8488
Fix crash
2020-06-18 12:08:24 +03:00
alesapin
ebb36bec8a
Merge branch 'master' into atomic_metadata5
2020-06-18 11:57:16 +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
Nikita Mikhaylov
ff0262626a
Merge pull request #11645 from azat/load-balancing-round-robin
...
Add round_robin load_balancing
2020-06-17 14:34:59 +04:00
alesapin
1ddeb3d149
Buildable getSampleBlock in StorageInMemoryMetadata
2020-06-16 18:51:29 +03:00
alesapin
53cb5210de
Move getSampleBlockNonMaterialized to StorageInMemoryMetadata
2020-06-16 15:48:10 +03:00
alesapin
36ba0192df
Metadata in read and write methods of IStorage
2020-06-15 22:08:58 +03:00
alesapin
af2fe2ba55
Compilable setColumns, setConstraints, setIndices
2020-06-15 19:55:33 +03:00
Azat Khuzhin
c139a05370
Forward declaration in StorageDistributed
2020-06-14 01:09:21 +03:00
alesapin
8be957ecb5
Better checks around metadata
2020-06-10 14:16:31 +03:00
alesapin
d2fcf5aea5
Fixes for gcc
2020-06-09 20:28:29 +03:00
alexey-milovidov
82e849e6a1
Update StorageDistributed.cpp
2020-06-06 18:57:52 +03:00
Azat Khuzhin
ff85125326
Fix readability-qualified-auto
2020-06-04 20:23:46 +03:00
Azat Khuzhin
86c5465bf8
Rewrite StorageSystemDistributionQueue interfaces
2020-06-04 03:04:32 +03:00
Azat Khuzhin
389f78ceee
Add system.distribution_queue
...
system.distribution_queue contains the following columns:
- database
- table
- data_path
- is_blocked
- error_count
- data_files
- data_compressed_bytes
2020-06-04 02:36:16 +03:00
Azat Khuzhin
60d10f1bac
Fix typo in StorageDistributed
2020-06-04 02:36:16 +03:00
alesapin
3847ea892d
Merge branch 'master' into consistent_metadata3
2020-06-01 13:17:59 +03:00
Alexey Milovidov
25f941020b
Remove namespace pollution
2020-05-31 00:57:37 +03:00
alesapin
52ca6b2051
I'm able to build it
2020-05-28 15:37:05 +03:00
Alexey Milovidov
7e1813825b
Return old names of macros
2020-05-24 01:24:01 +03:00
Alexey Milovidov
85f84550ba
Progress on task
2020-05-23 23:37:37 +03:00
Alexey Milovidov
9d2a0d2dd7
Apply all transformations again
2020-05-23 21:59:49 +03:00
Alexey Milovidov
a2ad11897f
Remove duplicate whitespaces (preparation)
2020-05-23 21:53:58 +03:00