Commit Graph

13 Commits

Author SHA1 Message Date
Amos Bird
ec7301b060
Fix incorrect normal projection AST format 2023-08-12 15:07:58 +08:00
Amos Bird
a33b90c648
Projection & optimize_group_by_function_keys 2023-07-11 21:11:28 +08:00
Amos Bird
1739bb306a
Projection & optimize_aggregators_of_group_by_keys
Fix projection with optimize_aggregators_of_group_by_keys = true
2023-07-11 21:11:27 +08: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 Gololobov
4ad8e2974d Simplify the logic by just adding ORDER BY list to SELECT 2022-11-12 12:58:53 +01:00
Alexander Gololobov
0e031f93e9 Properly fill ORDER BY ast to find all required columns during mutation 2022-11-12 00:17:28 +01:00
Robert Schulze
118e94523c
Activate clang-tidy warning "readability-container-contains"
This check suggests replacing <Container>.count() by
<Container>.contains() which is more speaking and in case of
multimaps/multisets also faster.
2022-04-18 23:53:11 +02:00
Amos Bird
2debfc922d
Better projection format and test fixes 2022-02-07 10:47:11 +08:00
Raúl Marín
7781fc12ed Reduce dependencies on ASTSelectWithUnionQuery.h
521 -> 77 files requiring changes
2021-11-26 19:27:16 +01:00
Amos Bird
9bbc9f97b4
Implement antlr parser for projections (#24245)
* implement projection grammer for antlr parser

* Add comment
2021-06-02 18:09:55 +03:00
Amos Bird
3be331edeb
Better exception for invalid projection creation 2021-05-31 12:24:09 +08:00
Nikolai Kochetov
95431168c2
Try to enable normal projections. 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