Smita Kulkarni
4dec8337f0
Merge branch 'master' into 40907_Parameterized_views_as_table_functions
2022-11-11 19:04:35 +01:00
Vitaly Baranov
e867f7fc11
Fix build.
2022-11-09 13:51:27 +01:00
Vladimir Chebotaryov
d17b7387f9
Reworked changes to std::shared_ptr<const RowPolicyFilter>
.
2022-10-27 10:42:55 +03:00
Vladimir Chebotaryov
6d5d31e49c
Removed UUID's.
2022-10-27 10:42:26 +03:00
Vladimir Chebotaryov
0707d88311
Removed extendQueryLogElemImplImpl
.
2022-10-27 10:42:25 +03:00
Vladimir Chebotaryov
c28e439c33
Review fixes.
2022-10-27 10:42:22 +03:00
Smita Kulkarni
d8fe1d2d63
Moved is_create_parameterized_view out of Context , and added into ActionsMatcher::Data and SelectQueryInfo - 40907 Parameterized views as table functions
2022-10-21 14:45:28 +02:00
Duc Canh Le
8590cc46c4
implement intersect + except distinct
2022-08-30 18:09:01 +08:00
Ilya Yatsishin
196fe5a269
Merge branch 'master' into exact-rows-before-limit
2022-07-22 12:34:30 +02:00
Alexander Tokmakov
bed2206ae9
Merge pull request #39460 from ClickHouse/remove_some_dead_and_commented_code
...
Remove some dead and commented code
2022-07-22 13:24:34 +03:00
Alexander Tokmakov
a8da5d96fc
remove some dead and commented code
2022-07-21 15:05:48 +02:00
Nikolai Kochetov
91aa2385ca
Merge branch 'master' into additional-filters
2022-07-20 18:56:24 +02:00
Ilya Yatsishin
4625e7f519
Merge branch 'master' into exact-rows-before-limit
2022-07-11 15:41:35 +02:00
Nikolai Kochetov
f63b27498f
Add additional_result_filter setting.
2022-07-06 12:37:37 +00:00
Igor Nikonov
488ee75fc4
+ use DistinctSorted for final distinct step
...
+ fix performance tests
2022-06-30 13:03:39 +00:00
mergify[bot]
4cbbfb431d
Merge branch 'master' into dictinct_in_order_optimization
2022-06-29 23:32:17 +00:00
Igor Nikonov
d435532c68
Adapt range search algorithm to high cardinality case
...
+ range search done in steps of some number of rows.
Controled by new
setting `distinct_in_order_range_search_step`. By default 0, i.e.
whole chunk
+ before start binary search, linear probing is done on each step (32
rows currently)
2022-06-29 23:30:35 +00:00
Azat Khuzhin
f86ddebada
Add sanity check for UNION header
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-28 22:53:03 +03:00
Azat Khuzhin
ee0f2651ee
Revert "Fix converting types for UNION queries (may produce LOGICAL_ERROR)"
...
This fix is incorrect, and it introduce new issues, in particular it
may breaks UNION queries w/o column aliases, i.e.:
SELECT a, b, c FROM (SELECT 3 AS a, 2147483647 AS b, 1048575 AS c UNION ALL SELECT -2, NULL, -2) AS js1 ORDER BY a
CI: https://s3.amazonaws.com/clickhouse-test-reports/37796/e637489f81768df582fe7389e57f7ed12893087c/fuzzer_astfuzzerdebug,actions//report.html
Reverts: #37593/#34775 (2613149f6b
)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-06-28 22:50:01 +03:00
Igor Nikonov
b0a98bd875
DISTINCT in order optimization
...
+ use SortDescription from input data stream in DistinctStep to decide if the optimization is applicable
2022-06-21 21:23:49 +00:00
Igor Nikonov
6ac68e8303
DISTINCT in order optimization
...
+ optimization for DISTINCT containing primary key columns
2022-06-20 10:06:15 +00:00
Nikolai Kochetov
85f4295370
Cleanup
2022-06-02 10:34:40 +00:00
Nikolai Kochetov
edac3d6714
Merge branch 'master' into refactor-read-metrics-and-callbacks
2022-06-02 09:36:20 +00:00
Robert Schulze
ee302f2d9f
Merge pull request #37643 from amosbird/avoid-useless-context-copy
...
Avoid useless context copy when building query interpreters
2022-06-01 13:49:56 +02:00
Nikolai Kochetov
86fbb74703
Merge branch 'master' into refactor-read-metrics-and-callbacks
2022-05-31 18:07:47 +00:00
Nikolai Kochetov
147a819221
Refactor a little bit more.
2022-05-31 14:43:38 +00:00
Nikolai Kochetov
913e7a91ae
Fix limits from subquery.
2022-05-30 18:25:17 +00:00
Amos Bird
6525bfc4cd
Avoid context copy for InterpreterSelects
2022-05-30 17:08:12 +08:00
Nikolai Kochetov
b80b1940ce
Fix some tests.
2022-05-27 20:47:35 +00:00
Azat Khuzhin
2613149f6b
Fix converting types for UNION queries (may produce LOGICAL_ERROR)
...
CI founds [1]:
2022.02.20 15:14:23.969247 [ 492 ] {} <Fatal> BaseDaemon: (version 22.3.1.1, build id: 6082C357CFA6FF99) (from thread 472) (query_id: a5187ff9-962a-4e7c-86f6-8d48850a47d6) (query: SELECT 0., round(avgWeighted(x, y)) FROM (SELECT toDate(toDate('214748364.8', '-922337203.6854775808', '-0.1', NULL) - NULL, 10.000100135803223, '-2147483647'), 255 AS x, -2147483647 AS y UNION ALL SELECT y, NULL AS x, 2147483646 AS y)) Received signal Aborted (6)
[1]: https://s3.amazonaws.com/clickhouse-test-reports/0/26d0e5438c86e52a145aaaf4cb523c399989a878/fuzzer_astfuzzerdebug,actions//report.html
The problem is that subqueries returns different headers:
- first query -- x, y
- second query -- y, x
v2: Make order of columns strict only for UNION
https://s3.amazonaws.com/clickhouse-test-reports/34775/9cc8c01a463d18c471853568b2f0af659a4e643f/stateless_tests__address__actions__[2/2].html
Fixes: 00597_push_down_predicate_long
v3: add no-backward-compatibility-check for the test
Fixes : #37569
Resubmit: #34775
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
(cherry picked from commit a813f5996e
)
2022-05-27 14:11:57 +03:00
Dmitry Novik
3a9239b79f
Revert "RFC: Fix converting types for UNION queries (may produce LOGICAL_ERROR)"
2022-05-27 04:05:32 +02:00
Azat Khuzhin
a813f5996e
Fix converting types for UNION queries (may produce LOGICAL_ERROR)
...
CI founds [1]:
2022.02.20 15:14:23.969247 [ 492 ] {} <Fatal> BaseDaemon: (version 22.3.1.1, build id: 6082C357CFA6FF99) (from thread 472) (query_id: a5187ff9-962a-4e7c-86f6-8d48850a47d6) (query: SELECT 0., round(avgWeighted(x, y)) FROM (SELECT toDate(toDate('214748364.8', '-922337203.6854775808', '-0.1', NULL) - NULL, 10.000100135803223, '-2147483647'), 255 AS x, -2147483647 AS y UNION ALL SELECT y, NULL AS x, 2147483646 AS y)) Received signal Aborted (6)
[1]: https://s3.amazonaws.com/clickhouse-test-reports/0/26d0e5438c86e52a145aaaf4cb523c399989a878/fuzzer_astfuzzerdebug,actions//report.html
The problem is that subqueries returns different headers:
- first query -- x, y
- second query -- y, x
v2: Make order of columns strict only for UNION
https://s3.amazonaws.com/clickhouse-test-reports/34775/9cc8c01a463d18c471853568b2f0af659a4e643f/stateless_tests__address__actions__[2/2].html
Fixes: 00597_push_down_predicate_long
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-05-25 20:31:47 +03:00
Nikolai Kochetov
3d84aae0ab
Better.
2022-05-24 20:06:08 +00:00
Nikolai Kochetov
9756b759c6
Move some resources
2022-05-23 13:46:57 +00:00
Nikolai Kochetov
56feef01e7
Move some resources
2022-05-20 19:49:31 +00:00
Robert Schulze
b24ca8de52
Fix various clang-tidy warnings
...
When I tried to add cool new clang-tidy 14 warnings, I noticed that the
current clang-tidy settings already produce a ton of warnings. This
commit addresses many of these. Almost all of them were non-critical,
i.e. C vs. C++ style casts.
2022-04-20 10:29:05 +02:00
MaxWk
032df9dc5d
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into exact-rows-before-limit
2022-04-05 22:28:48 +08:00
Amos Bird
fe4534d464
Get rid of duplicate query planing.
2022-03-08 00:02:58 +08:00
Raúl Marín
6c79e147d0
Add a few extra comments around uses_view_source and why it's propagated
2022-01-28 14:47:49 +01: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
hexiaoting
5c847264f7
Fix bug for select from VIEW with format and limit settings
2022-01-11 20:19:41 +08:00
alexey-milovidov
d25cd6610a
Merge branch 'master' into exact-rows-before-limit
2021-12-23 11:35:23 +03:00
Raúl Marín
7781fc12ed
Reduce dependencies on ASTSelectWithUnionQuery.h
...
521 -> 77 files requiring changes
2021-11-26 19:27:16 +01:00
kssenii
35349056b8
Fix
2021-11-01 16:33:19 +03:00
Alexander Tokmakov
d120fdf595
check if query context exist before using cache
2021-09-28 21:42:41 +03:00
Nikolai Kochetov
e616732743
Small refactoring.
2021-09-15 22:35:48 +03:00
kssenii
844e04e341
Fix
2021-08-16 15:32:44 +03:00
kssenii
c01be0354b
Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-union-distinct-subquery
2021-08-16 09:09:10 +03:00
kssenii
053cb22380
Fix for union distinct
2021-08-15 12:56:19 +03:00
kssenii
a549e29bd4
Better
2021-08-12 16:35:46 +03:00