MaxTheHuman
b39f5bd45f
grouping-sets: rearrange result columns so that resize is possible after grouping sets
2021-11-26 23:25:25 +03:00
MaxTheHuman
9953e1bc0a
grouping sets: add tests, fix bug
2021-11-26 23:09:23 +03:00
MaxTheHuman
2640f51843
grouping sets: fix
2021-11-26 23:05:07 +03:00
MaxTheHuman
4f07ec2659
grouping sets: make simple aggregation with grouping sets to work
2021-11-26 22:59:56 +03:00
MaxTheHuman
e32d58a36d
grouping sets dev: fix errors, something works
2021-11-26 22:46:15 +03:00
MaxTheHuman
e7711d953a
grouping sets cleanup
2021-11-26 22:33:14 +03:00
MaxTheHuman
ddd1799743
grouping sets development
2021-11-26 22:11:34 +03:00
MaxTheHuman
e60d1dd818
grouping sets development
2021-11-26 21:38:44 +03:00
MaxTheHuman
2bd07ef338
feat grouping-sets: initial changes
2021-11-26 20:24:35 +03:00
MaxTheHuman
8b95b7d271
init commit with parsing and BAD realisation
2021-11-23 17:58:16 +03:00
Anton Popov
ccd78e3838
Merge remote-tracking branch 'upstream/master' into HEAD
2021-11-22 17:19:35 +03:00
Vitaly Baranov
33ea7a7262
Rename RowPolicy::ConditionType -> RowPolicyFilterType and move it to Access/Common.
2021-11-19 00:14:23 +03:00
Alexander Tokmakov
672157b817
Merge branch 'master' into mvcc_prototype
2021-11-11 22:01:34 +03:00
Anton Popov
a20922b2d3
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-11-09 15:36:25 +03:00
kssenii
bfde7fd36c
Better
2021-11-09 12:06:43 +00:00
kssenii
dead99011b
Merge branch 'master' of github.com:ClickHouse/ClickHouse into intersect-except-fix
2021-11-08 16:15:33 +03:00
Alexander Tokmakov
92eec74ad7
Merge branch 'master' into mvcc_prototype
2021-11-06 21:08:36 +03:00
Kruglov Pavel
2f950ee138
Merge pull request #30927 from CurtizJ/with-fill-interval
...
Support `INTERVAL` type in `STEP` clause for `WITH FILL` modifier
2021-11-03 11:23:21 +03:00
Vitaly Baranov
3ed7f8f0b3
Move access-rights' source files needed for parser to a separate target.
2021-11-01 19:13:49 +03:00
kssenii
35349056b8
Fix
2021-11-01 16:33:19 +03:00
Anton Popov
aff2711f1a
support INTERVAL type in WITH FILL
2021-10-31 19:42:43 +03:00
Amos Bird
211c3d4d49
Better Projection IN
2021-10-29 20:24:36 +08:00
Nikolai Kochetov
b549bddc11
Merge pull request #29735 from ClickHouse/fix-backward-compatibility-after-21196
...
Fix backward compatibility after #21196 .
2021-10-26 16:31:40 +03:00
Anton Popov
cdfa36a181
Merge pull request #30266 from CurtizJ/aggregation-in-order-4
...
Improve performance of aggregation in order of primary key
2021-10-23 18:09:17 +03:00
Nikolai Kochetov
1533f4af57
Merge pull request #30335 from ClickHouse/single-sorting-step
...
Single sorting step
2021-10-22 11:34:29 +03:00
Amos Bird
2f615e9176
Use original_query for projection analysis
2021-10-20 21:30:15 +08:00
Anton Popov
82bff416f6
Merge remote-tracking branch 'upstream/master' into HEAD
2021-10-19 16:48:47 +03:00
Anton Popov
c547ffa313
improve performance of aggregation in order primary key with function with heavy states
2021-10-19 16:36:31 +03:00
mergify[bot]
69667aab1a
Merge branch 'master' into fix-backward-compatibility-after-21196
2021-10-19 10:11:16 +00:00
Nikolai Kochetov
34d46245c3
Try fix some tests.
2021-10-18 20:53:30 +03:00
Nikolai Kochetov
5a4a752cfb
Unite sorting steps.
2021-10-18 17:37:46 +03:00
Nikolai Kochetov
6e479b301a
Update memory optimisation for MergingSorted.
2021-10-18 12:54:12 +03:00
Nikolai Kochetov
a08c98d760
Move some files.
2021-10-16 17:03:50 +03:00
Nikolai Kochetov
fd14faeae2
Remove DataStreams folder.
2021-10-15 23:18:20 +03:00
Nikolai Kochetov
2957971ee3
Remove some last streams.
2021-10-13 21:22:02 +03:00
Nikolai Kochetov
06d9fc602e
Merge branch 'master' into fix-backward-compatibility-after-21196
2021-10-12 14:41:23 +03:00
Nikolai Kochetov
340b53ef85
Remove some more streams.
2021-10-08 17:03:54 +03:00
Nikolai Kochetov
e2d07fbdf5
Merge branch 'master' into fix-backward-compatibility-after-21196
2021-10-04 17:35:32 +03:00
Nikolai Kochetov
6169b180cb
Fix backward compatibility after #21196 .
2021-10-04 17:27:44 +03:00
Alexey Milovidov
fe6b7c77c7
Rename "common" to "base"
2021-10-02 10:13:14 +03:00
Kruglov Pavel
14be2f31f5
Merge pull request #29475 from ClickHouse/fix-29010
...
Remove filter column from HAVING when it is not needed.
2021-09-29 13:03:27 +03:00
Nikolai Kochetov
1a4ee1f77f
Remove filter column from HAVING when it is not needed.
2021-09-28 13:01:47 +03:00
Alexander Tokmakov
72b1b2e360
Merge branch 'master' into mvcc_prototype
2021-09-23 22:53:27 +03:00
Nikolai Kochetov
e616732743
Small refactoring.
2021-09-15 22:35:48 +03:00
Anton Popov
4c388e3d84
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-09-09 14:10:16 +03:00
vdimir
e8e26463bf
Change signature of ASTSelectQuery::arrayJoinExpressionList
2021-08-31 15:27:44 +03:00
vdimir
3443b3b5c4
Separate functoin buildJoinedPlan, minor refactoring
2021-08-31 15:27:44 +03:00
Kseniia Sumarokova
19afb22b4d
Merge pull request #27932 from amosbird/constkeys
...
Add a setting to bring back the old behavior of grouping by constant keys on empty set.
2021-08-21 08:02:30 +03:00
Amos Bird
5708ed42ec
Add setting.
...
empty_result_for_aggregation_by_constant_keys_on_empty_set
2021-08-20 22:34:32 +08:00
Anton Popov
61239343e3
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-08-20 16:33:30 +03:00
kssenii
8da7f406af
Better comment
2021-08-17 11:03:01 +03:00
Kseniia Sumarokova
6001c7f214
Update InterpreterSelectQuery.cpp
2021-08-17 08:44:51 +03:00
kssenii
1ad4b6ed60
Fix
2021-08-16 23:34:39 +03:00
Raúl Marín
d1d47658f5
Merge remote-tracking branch 'blessed/master' into materialization_log
2021-08-10 10:49:05 +02:00
Azat Khuzhin
3be3c503aa
Fix some comments
2021-08-08 09:58:07 +03:00
alexey-milovidov
c5207fc237
Merge pull request #26466 from azat/optimize-dist-select
...
Rework SELECT from Distributed optimizations
2021-08-08 03:59:32 +03:00
mergify[bot]
589505e76b
Merge branch 'master' into legacy-tuple-name
2021-08-07 16:42:20 +00:00
Azat Khuzhin
1358a2db92
Fix WithMergeableStateAfterAggregationAndLimit with LIMIT BY and LIMIT OFFSET
...
In case of LIMIT BY, pre LIMIT cannot be applied (that is done on the
shard before), and hence shard applies regular LIMIT, but it goes with
applying OFFSET, and also the initiator will do apply OFFSET too.
2021-08-06 00:16:26 +03:00
Azat Khuzhin
c4e2342a06
Add verbose description for pre-LIMIT into EXPLAIN query
2021-08-06 00:16:26 +03:00
Raúl Marín
479f053f2e
Merge remote-tracking branch 'blessed/master' into materialization_log
2021-08-05 17:24:10 +02:00
Alexander Kuzmenkov
d852207b0e
Merge pull request #25721 from CurtizJ/read-in-order-perf-2
...
Reduce memory usage in queries with `ORDER BY primary_key
2021-08-05 16:13:48 +03:00
Anton Popov
915ef50c2d
optimize reading in order of key more
2021-08-04 18:18:03 +03:00
Anton Popov
699a3d9031
implement legacy_column_name_of_tuple_literal in less intrusive way
2021-08-03 21:03:24 +03:00
Anton Popov
e36736b50c
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-08-02 22:52:02 +03:00
Azat Khuzhin
ff12f5102a
Avoid running LIMIT BY/DISTINCT step on the initiator for optimize_distributed_group_by_sharding_key
...
Before the following queries was running LimitBy/Distinct step on the
initator:
select distinct sharding_key from dist order by k
While this can be omitted.
2021-08-02 21:04:30 +03:00
Raúl Marín
9f32ecca89
Merge remote-tracking branch 'blessed/master' into materialization_log
2021-08-02 16:21:10 +02:00
Anton Popov
cc3ed12ed6
Merge remote-tracking branch 'upstream/master' into HEAD
2021-08-02 02:56:00 +03:00
Amos Bird
7b9e81742f
Shard level constness
2021-07-30 18:53:34 +08:00
Alexander Tokmakov
c74bfbf991
Merge branch 'master' into mvcc_prototype
2021-07-28 22:21:48 +03:00
Raúl Marín
f0125262b7
Add views and it's tables to system.query_log
2021-07-27 16:29:33 +02:00
Alexander Tokmakov
63ab38ee09
rename MaterializeMySQL to MaterializedMySQL
2021-07-26 21:17:28 +03:00
Anton Popov
f99374cca6
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-07-20 18:20:21 +03:00
mergify[bot]
39f71f4a08
Merge branch 'master' into fix_no_column_materialized_mysql
2021-07-19 12:27:38 +00:00
Anton Popov
f61ea15d56
fix pushdown of limit to reading stage
2021-07-16 20:40:00 +03:00
Anton Popov
03c785931a
fix pushdown of limit to reading stage
2021-07-16 17:27:38 +03:00
Anton Popov
c45a9e3bd6
Merge remote-tracking branch 'upstream/master' into HEAD
2021-07-16 17:11:34 +03:00
Raúl Marín
c2f0d7c514
Don't build set for indices when analyzing a query
2021-07-15 14:25:22 +02:00
Amos Bird
0558ecdc3f
Aggressive IN index analysis for projections.
2021-07-14 22:56:52 +08:00
Anton Popov
cb042afa9d
pushdown limit while reading in order of primary key
2021-07-13 17:24:45 +03:00
mergify[bot]
d5898ecba6
Merge branch 'master' into fix_no_column_materialized_mysql
2021-07-13 14:03:05 +00:00
alexey-milovidov
4b1e38eed9
Merge branch 'master' into projection-fix11
2021-07-13 04:52:15 +03:00
Alexey Milovidov
e0ae04297a
Fix fast test
2021-07-12 18:19:49 +03:00
Anton Popov
6ba41dc265
fix projections with storage snapshot
2021-07-12 16:45:35 +03:00
Anton Popov
3ed7f5a6cc
dynamic subcolumns: add snapshot for storage
2021-07-09 06:15:41 +03:00
vdimir
d4256a8583
Minor style changes in JoinedTables
2021-07-08 13:49:13 +03:00
vdimir
5d7fc61bd5
Merge branch 'master' into join-materialized-columns
2021-07-08 12:30:00 +03:00
Anton Popov
072e65b728
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-07-07 17:20:38 +03:00
mergify[bot]
446474932b
Merge branch 'master' into projection-fix11
2021-07-07 05:02:44 +00:00
Amos Bird
55981cb0ae
Fix normal projection
2021-07-07 13:01:30 +08:00
alexey-milovidov
b724138541
Merge pull request #25786 from kssenii/inconsisteny
...
Fix inconsistent behaviour of GROUP BY constant on empty set
2021-07-06 03:36:50 +03:00
Alexander Tokmakov
0f377fc4d8
Merge branch 'master' into fix_no_column_materialized_mysql
2021-07-05 22:07:56 +03:00
alexey-milovidov
fef7c557f6
Merge pull request #24789 from kitaisreal/compile-aggregation-functions
...
Compile aggregate functions
2021-07-05 02:57:49 +03:00
kssenii
77879f6826
Better
2021-07-04 01:53:51 +03:00
kssenii
a9a91a4f15
Setting move to prewhere if final
2021-07-03 11:37:50 +00:00
kssenii
02681019f8
Fix
2021-07-03 08:48:42 +00:00
Maksim Kita
da8c957167
Aggregator added CompiledExpressionCache
2021-07-01 22:56:36 +03:00
Maksim Kita
d24d3ae992
Added second variant of compilation
2021-07-01 22:56:36 +03:00
Maksim Kita
3fe559b31f
Compile aggregate functions
2021-07-01 22:56:35 +03:00
Alexander Tokmakov
fd914f3d97
fix 'Not found column' error in MaterializeMySQL
2021-06-29 20:47:41 +03:00
Nikolai Kochetov
3544b059ce
Merge branch 'master' into remove-PrewhereDAGInfo
2021-06-25 17:52:03 +03:00
Nikolai Kochetov
6bc0a628cd
Remove PrewhereDAGInfo.
2021-06-25 17:49:28 +03:00
vdimir
2949cd1e6f
Support ALIASed columns in JOIN ON expression
2021-06-25 14:50:02 +03:00
vdimir
241b64d02c
Support ALIASed columns for right joined table
2021-06-24 17:57:21 +03:00
vdimir
84e02911cf
Materialized columns for joined table, don't add to asterisk select
2021-06-24 17:14:36 +03:00
Anton Popov
c2754c34f4
Merge remote-tracking branch 'upstream/master' into HEAD
2021-06-21 12:42:48 +03:00
Anton Popov
d8b6f15ef4
Merge pull request #23027 from azat/distributed-push-down-limit
...
Add ability to push down LIMIT for distributed queries
2021-06-20 23:08:50 +03:00
Nikolai Kochetov
b2620e1def
Merge pull request #24405 from amosbird/replacemorealias
...
Rewrite more alias columns
2021-06-18 09:10:31 +03:00
Amos Bird
0f7728cd5e
Fix RBAC test again
2021-06-17 23:00:03 +08:00
Maksim Kita
67e9b85951
Merge ext into common
2021-06-16 23:28:41 +03:00
Anton Popov
ea9b890618
Merge branch 'master' into add-compatibility-setting
2021-06-16 21:10:56 +03:00
Anton Popov
8bd7cbd925
add compatibility setting for name of columns
2021-06-16 21:10:07 +03:00
mergify[bot]
7959d92029
Merge branch 'master' into minor-changes-3
2021-06-15 18:07:24 +00:00
Nikita Mikhaylov
a52bba91b7
Merge pull request #16401 from abyss7/ast-table-identifier-2
...
ASTTableIdentifier part #2 : Introduce ASTTableIdentifier
2021-06-15 13:51:30 +03:00
Amos Bird
aaac231c6a
Record expanded aliases for RBAC
2021-06-15 18:28:13 +08:00
Amos Bird
e3ae2f6e7a
Rewrite more alias columns
2021-06-15 17:54:28 +08:00
Alexey Milovidov
447d7bb8cd
Minor changes
2021-06-14 07:13:35 +03:00
Alexander Tokmakov
6f5cf773ef
Merge branch 'master' into mvcc_prototype
2021-06-09 12:50:54 +03:00
Azat Khuzhin
18e8f0eb5e
Add ability to push down LIMIT for distributed queries
...
This way the remote nodes will not need to send all the rows, so this
will decrease network io and also this will make queries w/
optimize_aggregation_in_order=1/LIMIT X and w/o ORDER BY faster since it
initiator will not need to read all the rows, only first X (but note
that for this you need to your data to be sharded correctly or you may
get inaccurate results).
Note, that having lots of processing stages will increase the complexity
of interpreter (it is already not that clean and simple right now).
Although using separate QueryProcessingStage looks pretty natural.
Another option is to make WithMergeableStateAfterAggregation always, but
in this case you will not be able to disable only this optimization,
i.e. if there will be some issue with it.
v2: fix OFFSET
v3: convert 01814_distributed_push_down_limit test to .sh and add retries
v4: add test with OFFSET
v5: add new query stage into the bash completion
v6/tests: use LIMIT O,L syntax over LIMIT L OFFSET O since it is broken in ANTLR parser
https://clickhouse-test-reports.s3.yandex.net/23027/a18a06399b7aeacba7c50b5d1e981ada5df19745/functional_stateless_tests_(antlr_debug).html#fail1
v7/tests: set use_hedged_requests to 0, to avoid excessive log entries on retries
https://clickhouse-test-reports.s3.yandex.net/23027/a18a06399b7aeacba7c50b5d1e981ada5df19745/functional_stateless_tests_flaky_check_(address).html#fail1
2021-06-09 02:29:50 +03:00
Ivan
579250168f
Merge branch 'master' into ast-table-identifier-2
2021-06-07 20:30:39 +03:00
Anton Popov
205a23282b
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-06-07 19:38:22 +03:00
Alexey Milovidov
885ce194e0
Making fundamentals correct
2021-06-07 00:49:55 +03:00
Amos Bird
9dfa4c06bd
Try reusing built sets during multi-pass analysis
2021-06-03 22:06:05 +08:00
Ivan Lezhankin
ae38b4a3f1
Merge remote-tracking branch 'upstream/master' into ast-table-identifier-2
2021-06-02 16:07:59 +03:00
Anton Popov
9f52362b81
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-05-31 23:08:45 +03:00
Alexander Tokmakov
5692db736c
Merge branch 'master' into mvcc_prototype
2021-05-31 21:11:22 +03:00
Alexander Kuzmenkov
6cccb0992a
fix ORDER BY after window fuctions over Distributed
2021-05-27 19:06:37 +03:00
Anton Popov
0bdf9d207c
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-05-26 00:25:47 +03:00
mergify[bot]
970243850f
Merge branch 'master' into ast-table-identifier-2
2021-05-21 12:56:49 +00:00
Maksim Kita
b0476c1fa2
Merge pull request #24273 from kitaisreal/expression-actions-compile-only-necessary-places
...
ExpressionActions compile only necessary places
2021-05-20 10:53:30 +03:00
Maksim Kita
c50909468f
Updated ExpressionActionSettings
2021-05-19 17:32:07 +03:00
Alexander Kuzmenkov
e9b69bbd70
Merge pull request #23906 from azat/fix-distributed_group_by_no_merge
...
distributed_group_by_no_merge fixes
2021-05-19 16:16:08 +03:00
Maksim Kita
150a88d647
ExpressionActions compile only necessary places
2021-05-19 11:43:16 +03:00
Ivan Lezhankin
bd16dd22b9
Merge remote-tracking branch 'upstream/master' into ast-table-identifier-2
2021-05-14 15:40:33 +03:00
Alexander Tokmakov
df2849be90
Merge branch 'master' into mvcc_prototype
2021-05-13 21:48:36 +03:00
Anton Popov
37989cd2ae
fix reading of nested
2021-05-11 15:01:41 +03:00
Amos Bird
5836e2e277
Fix issues in normal projection
2021-05-11 18:12:29 +08:00
Amos Bird
dfa5629071
Remove projection type ast
2021-05-11 18:12:29 +08:00
Amos Bird
51d685bb9c
Even more fixes
2021-05-11 18:12:29 +08:00
Amos Bird
718c284437
Fix more tests
2021-05-11 18:12:28 +08:00
Amos Bird
ba17acbd63
Fix tests
2021-05-11 18:12:28 +08:00
Amos Bird
42f161b1dc
Fix more
2021-05-11 18:12:28 +08:00
Amos Bird
9c069ebdbf
support prewhere, row_filter, read_in_order and decent projection selection
...
TODO set index analysis in projection
2021-05-11 18:12:27 +08:00
Amos Bird
35961c0c5d
Use ActionsDAG to rewrite projection queries
2021-05-11 18:12:27 +08:00
Nikolai Kochetov
29d7038e30
Add ProjectionDescription::Type enum. Remove some checks.
2021-05-11 18:12:27 +08:00
Amos Bird
ebaf42a448
Reformat and fix some tests
2021-05-11 18:12:27 +08:00
Nikolai Kochetov
c2396c5144
Disable read-in-order optimization in case of projections.
2021-05-11 18:12:26 +08:00
Nikolai Kochetov
3d36fb57eb
Cleanup code.
2021-05-11 18:12:26 +08:00
Nikolai Kochetov
3296c9292f
Try to merge projectons faster.
2021-05-11 18:12:26 +08:00
Amos Bird
cd6414639e
add metadata_snapshot to getQueryProcessingStage
2021-05-11 18:12:26 +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