Commit Graph

104 Commits

Author SHA1 Message Date
Anton Popov
7ebb7d2955 better trivial count optimization for storage Merge 2023-12-18 15:13:43 +00:00
Robert Schulze
fc67d2c0e9
Merge pull request #57867 from skyoct/read_code
Support trivial count optimization for `Merge`-engine tables
2023-12-17 10:45:21 +01:00
skyoct
d700eb2501 feat: support trivial count optimization for Merge 2023-12-14 14:08:24 +00:00
Ilya Golshtein
c2816ec589 merge_row_policy: make clang-tidy happy 2023-11-21 22:06:18 +00:00
Ilya Golshtein
a8abec6cac merge_row_policy: cleanup after merge 2023-11-18 21:45:17 +00:00
Ilya Golshtein
9eeae568e4 Merge remote-tracking branch 'origin/master' into merge_row_policy
merge_row_policy: changes because of refactoring in master
2023-11-17 09:19:56 +00:00
Ilya Golshtein
3e6a5d8208 merge_row_policy: some comments 2023-11-14 12:22:32 +00:00
Ilya Golshtein
9c5f9f7dcb merge_row_policy: style fix, cleanup 2023-11-09 00:51:57 +03:00
Ilya Golshtein
f1af83447e merge_row_policy: cleanup, traces removed 2023-11-08 23:07:08 +03:00
Ilya Golshtein
6e189b17c0 merge_row_policy: processAliases introduced 2023-11-08 18:55:19 +03:00
Ilya Golshtein
d900f8a352 merge_row_policy: aliases slightly work 2023-11-06 15:18:25 +03:00
Ilya Golshtein
ea95a49e86 merge_row_policy: some changes per code review 2023-10-16 21:22:43 +00:00
Ilya Golshtein
9a561cff82 merge_row_policy: cleanup, verbose short messages in 00002_log ... 2023-10-05 08:23:53 +00:00
Ilya Golshtein
b39a201cd0 merge_row_policy: refactored with ReadFromMerge::RowPolicyData 2023-10-05 08:23:52 +00:00
Ilya Golshtein
b6f682dc3f merge_row_policy: FilterTransform 2023-10-05 08:23:52 +00:00
Nikita Taranov
595027b1c6 better 2023-09-26 11:51:34 +02:00
Nikita Taranov
8d19566c7d impl 2023-09-25 23:58:20 +02:00
Nikita Mikhaylov
1c3b6738f4
Fixes for parallel replicas (#50195) 2023-05-25 14:41:04 +02:00
Azat Khuzhin
907ed27ae2 Fix crash in EXPLAIN PIPELINE for Merge over Distributed
CI: https://s3.amazonaws.com/clickhouse-test-reports/48314/179450542879d11711cd2415c3fa7eeab18188be/fuzzer_astfuzzerasan/report.html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-04-02 10:48:23 +02:00
vdimir
588fdcffdf
comment child_plans in ReadFromMerge 2023-03-29 09:42:32 +00:00
vdimir
7a85974c35
Fix crash in explain graph with StorageMerge 2023-03-28 11:04:07 +00:00
Maksim Kita
51ee007e01 Fixed tests 2023-03-01 18:05:07 +01:00
Maksim Kita
6dffe52e68
Merge pull request #46471 from kitaisreal/analyzer-planner-fixes-before-enable-by-default
Analyzer planner fixes before enable by default
2023-02-19 13:49:18 +03:00
Azat Khuzhin
beff5ac795 Fix PREWHERE for Merge with different default types
In case of underlying table has an ALIAS for this column, while in Merge
table it is not marked as an alias, there will NOT_FOUND_COLUMN_IN_BLOCK
error.

Further more, when underlying tables has different default type for the
column, i.e. one has ALIAS and another has real column, then you will
also get NOT_FOUND_COLUMN_IN_BLOCK, because Merge engine should take
care of this.

Also this patch reworks how PREWHERE is handled for Merge table, and now
if you use PREWHERE on the column that has the same type and default
type (ALIAS, ...) then it will be possible, and only if the type
differs, it will be prohibited and throw ILLEGAL_PREWHERE error.

And last, but not least, also respect this restrictions for
optimize_move_to_prewhere.

v2: introduce IStorage::supportedPrewhereColumns()
v3: Remove excessive condition for PREWHERE in StorageMerge::read()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-16 17:21:53 +01:00
Maksim Kita
6b2adc1ec2 Analyzer storage Merge fixes 2023-02-16 12:17:03 +01:00
Maksim Kita
b1ab2af7ad Analyzer support storage Merge 2023-02-16 12:17:03 +01:00
vdimir
45f7ef6c8f
Do not apply read in reverse order for queries with final 2023-02-09 11:00:22 +00:00
Antonio Andelic
108b2384e7 Disable prewhere in storage merge if types don't match 2023-01-16 13:39:46 +00:00
Nikolai Kochetov
58c7547f51 Removed check and added a test. 2023-01-06 15:04:00 +00:00
Nikolai Kochetov
a0dad93a38 Check whatt if disable some checks in storage Merge. 2023-01-06 13:26:15 +00:00
Nikolai Kochetov
9ffebf4a0c Fixing read-in-order for special storages. 2022-11-01 19:51:52 +00:00
Azat Khuzhin
4e76629aaf Fixes for -Wshorten-64-to-32
- lots of static_cast
- add safe_cast
- types adjustments
  - config
  - IStorage::read/watch
  - ...
- some TODO's (to convert types in future)

P.S. That was quite a journey...

v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Amos Bird
fa8fab2e8f
Fix KeyCondition with other filters 2022-08-11 19:20:44 +08:00
Nikolai Kochetov
f9a8a4cd32 Fixing read-in-order for Merge 2022-07-27 12:00:55 +00:00
Nikolai Kochetov
d7cc3831ea Push predicate over StorageMerge. 2022-07-26 15:01:39 +00:00
Nikolai Kochetov
c5110bb164 Add a query plan step for StorageMerge 2022-07-26 14:43:05 +00:00
Nikolai Kochetov
be9c7ed52c Add ReadFromMerge step. 2022-07-25 19:41:43 +00:00
Nikolai Kochetov
56feef01e7 Move some resources 2022-05-20 19:49:31 +00:00
Robert Schulze
777b5bc15b
Don't let storages inherit from boost::noncopyable
... IStorage has deleted copy ctor / assignment already
2022-05-03 09:07:08 +02:00
Robert Schulze
330212e0f4
Remove inherited create() method + disallow copying
The original motivation for this commit was that shared_ptr_helper used
std::shared_ptr<>() which does two heap allocations instead of
make_shared<>() which does a single allocation. Turned out that
1. the affected code (--> Storages/) is not on a hot path (rendering the
performance argument moot ...)
2. yet copying Storage objects is potentially dangerous and was
   previously allowed.

Hence, this change

- removes shared_ptr_helper and as a result all inherited create() methods,

- instead, Storage objects are now created using make_shared<>() by the
  caller (for that to work, many constructors had to be made public), and

- all Storage classes were marked as noncopyable using boost::noncopyable.

In sum, we are (likely) not making things faster but the code becomes
cleaner and harder to misuse.
2022-05-02 08:46:52 +02:00
Anton Popov
e8ce091e68 Merge remote-tracking branch 'upstream/master' into HEAD 2022-01-21 20:11:18 +03:00
Anton Popov
abcc48c1f6 Merge remote-tracking branch 'upstream/master' into support-prewhere-storage-merge 2021-12-29 21:07:35 +03:00
Anton Popov
7c6f7f6732 support 'optimize_move_to_prewhere' with storage 'Merge' 2021-12-29 20:49:10 +03:00
avogar
8112a71233 Implement schema inference for most input formats 2021-12-29 12:18:56 +03:00
Anton Popov
ccd78e3838 Merge remote-tracking branch 'upstream/master' into HEAD 2021-11-22 17:19:35 +03:00
kssenii
18b9a8f7fd Fix build check 2021-11-11 02:03:56 +03:00
kssenii
a2326f5035 Fix 2021-11-10 19:03:54 +03:00
kssenii
f4f0bd8b5c Fix 2021-11-10 13:16:39 +03:00
Anton Popov
a20922b2d3 Merge remote-tracking branch 'origin/sparse-serialization' into HEAD 2021-11-09 15:36:25 +03:00
Alexander Tokmakov
2e7e195e77 change alter_lock to std::timed_mutex 2021-10-26 13:37:00 +03:00