Commit Graph

250 Commits

Author SHA1 Message Date
Nikolai Kochetov
c643069b0d
Merge pull request #54905 from nickitat/fix_key_analysis_merge_engine
Fix key analysis (with set) for `Merge` engine
2023-11-09 14:52:54 +01:00
Alexey Milovidov
2aaddcce18 Better exception messages 2023-10-08 22:54:33 +02:00
Nikita Taranov
86f4f91573
Merge branch 'master' into fix_key_analysis_merge_engine 2023-09-27 16:13:14 +02:00
Nikita Taranov
595027b1c6 better 2023-09-26 11:51:34 +02:00
Nikita Taranov
694792fa5d fix for analyzer 2023-09-25 23:58:29 +02:00
Nikita Taranov
8d19566c7d impl 2023-09-25 23:58:20 +02:00
Robert Schulze
f5137dd0b4
More clang-tidy fixes 2023-09-21 14:40:57 +00:00
Azat Khuzhin
5611b2fff4 Add a note about not working _table filter for Merge with analyzer
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-07-27 16:35:17 +02:00
Nikita Mikhaylov
1c3b6738f4
Fixes for parallel replicas (#50195) 2023-05-25 14:41:04 +02:00
Yakov Olkhovskiy
35e9e45249
Merge pull request #48062 from Algunenano/unnecessary_alter_checks
Only check MV on ALTER when necessary
2023-04-03 17:23:11 -04: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
Raúl Marín
d1a6c1991a Only check MV on ALTER when necessary 2023-03-27 17:45:15 +02:00
Robert Schulze
348a40aa5d
Compile with C++23 2023-03-10 19:11:58 +00:00
Maksim Kita
51ee007e01 Fixed tests 2023-03-01 18:05:07 +01:00
Azat Khuzhin
86e9b131c7 Allow PREWHERE for Merge with different DEFAULT expression for column
It can be not that special to have Merge engine w/o default expression,
while MergeTree will have it. So improve PREWHERE for such kinds, and
also allow PREWHERE for DEFAULT and MATERIALIZED (since both are
physical columns on disk and this make sense).

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-02-24 16:33:49 +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
Vladimir C
89cb55aa1f
whitespace 2023-02-13 12:19:31 +01:00
Vladimir C
ea670acb72
Add comment to requestReadingInOrder 2023-02-10 20:05:18 +01:00
vdimir
45f7ef6c8f
Do not apply read in reverse order for queries with final 2023-02-09 11:00:22 +00:00
flynn
2d1dd694c6 make _table LowCardinality 2023-02-02 16:33:31 +00:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
Alexander Tokmakov
910d6dc0ce
Merge pull request #45342 from ClickHouse/exception_message_patterns
Save message format strings for DB::Exception
2023-01-20 18:46:52 +03:00
Antonio Andelic
76eb3e3b3c Fix test 2023-01-17 07:34:39 +00:00
Alexander Tokmakov
522686f78b less empty patterns 2023-01-17 01:19:44 +01:00
Antonio Andelic
108b2384e7 Disable prewhere in storage merge if types don't match 2023-01-16 13:39:46 +00:00
Maksim Kita
fbba28b31e Analyzer aggregation without column fix 2023-01-10 16:49:55 +01:00
Vladimir C
75e9a45341
Merge pull request #44716 from ClickHouse/vdimir/merge_engine_nullable 2023-01-09 11:38:04 +01:00
Nikolai Kochetov
398ae6a216 Fix style. 2023-01-06 15:33:19 +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
Vladimir C
2ff0d7e942
Apply suggestion 2022-12-30 16:48:57 +01:00
vdimir
aa3ecbab0a
Fix bug with wring type in Merge table with PREWHERE 2022-12-29 15:22:31 +00:00
Maksim Kita
99de697ea2 Analyzer added indexes support 2022-12-08 17:30:32 +01:00
Nikolai Kochetov
9ffebf4a0c Fixing read-in-order for special storages. 2022-11-01 19:51:52 +00:00
Maksim Kita
ca93ee7479 Fixed tests 2022-10-24 10:22:20 +02:00
Maksim Kita
fed146e198 Added SAMPLE BY support. Added SAMPLE BY, FINAL support for JOINS. 2022-10-24 10:22:20 +02: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
Alexey Milovidov
ab4db2d0c4 Fix 5/6 of trash 2022-09-19 08:50:53 +02:00
Duc Canh Le
24682556a4
Fix storage merge on view cannot use primary index (#40233)
* fix storage merge on view cannot use index

* minor fix code + tests

* fix view stage

* fix stage

* fix style

* fix tests
2022-08-19 14:24:22 +02:00
Amos Bird
fa8fab2e8f
Fix KeyCondition with other filters 2022-08-11 19:20:44 +08:00
Nikolai Kochetov
51c4c9c957 Fixing build. 2022-07-27 15:45:23 +00:00
Nikolai Kochetov
f9a8a4cd32 Fixing read-in-order for Merge 2022-07-27 12:00:55 +00:00
Nikolai Kochetov
1adb021df6 Fixing tests. 2022-07-26 18:42:27 +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