Anton Popov
699a3d9031
implement legacy_column_name_of_tuple_literal in less intrusive way
2021-08-03 21:03:24 +03:00
Vladimir
576b407804
Support conditions in JOIN ON section ( #24420 )
...
* Try to enforce table identification in CollectJoinOnKeysMatcher
* Support filtering conditions in JOIN ON for HashJoin
* Correct handle non equi join
* Update test 00878_join_unexpected_results
* Join on filters calculated as one row before join
* Do not lookup key in hash join if condition for row is not hold
* better
* Support filtering conditions in JOIN ON for MergeJoin
* Support Nullable mask in JOIN ON section
* Fix style in Interpreters/TableJoin.cpp
* Change return type of getColumnAsMask in join_common to ColumnPtr
* Handle Nullable(Nothing) type in JOIN ON section, add test cases
* Fix type cast JoinCommon::getColumnAsMask
* Check type if conditions in JOIN ON section, support functions
* Update tests with JOIN ON
* Style changes, add comments for conditions in JOIN ON section
* Add test cases for join on condtions
* JOIN ON key1 = key2 AND (cond1 OR cond2)
* Remove CollectJoinOnKeysVisitor has_join_keys
* Add test cases for join on nullable/lc conditions
* Fix style
* Change error code 48 to 403 in join on tests
* Fix whitespace
2021-07-21 20:03:33 +03:00
Amos Bird
d74aa64f6b
Fix column alias rewriting
2021-07-18 23:27:19 +08:00
vdimir
5d7fc61bd5
Merge branch 'master' into join-materialized-columns
2021-07-08 12:30:00 +03:00
Azat Khuzhin
15a14d6da2
Fix "No available columns" for Merge() storage
2021-06-29 00:39:38 +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
vdimir
b00efaf3d1
Add materialized columns to joined columns
2021-06-23 17:03:39 +03:00
Amos Bird
0f7728cd5e
Fix RBAC test again
2021-06-17 23:00:03 +08: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
05d1af153c
Merge branch 'master' into rename-const-context-ptr
2021-06-12 03:25:09 +03:00
Anton Popov
bb6f0dfbb8
Merge pull request #24406 from CurtizJ/rewrite-functions-to-subcolumns
...
Optimize some functions to subcolumns
2021-06-09 11:07:09 +03:00
alesapin
11a1606c15
Less strict
2021-06-08 12:54:00 +03:00
alesapin
5284f192ee
Ban loop aliases in table definitions
2021-06-07 23:59:38 +03:00
Nikolai Kochetov
dbaa6ffc62
Rename ContextConstPtr to ContextPtr.
2021-06-01 15:20:52 +03:00
Anton Popov
b24f65e1ad
Merge remote-tracking branch 'upstream/master' into HEAD
2021-05-31 23:04:52 +03:00
Alexander Kuzmenkov
3f57fc085b
remove mutable context references from functions interface
...
Also remove it from some visitors.
2021-05-28 19:45:37 +03:00
Anton Popov
13cfedd188
optimize some functions to subcolumns
2021-05-21 21:48:19 +03:00
Amos Bird
ebaf42a448
Reformat and fix some tests
2021-05-11 18:12:27 +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
Amos Bird
8a3b5c1fab
Add _partition_value virtual column
2021-04-27 16:15:59 +08:00
Alexander Kuzmenkov
5e0fb440a5
Update TreeRewriter.cpp
2021-04-16 13:35:02 +03:00
Alexander Kuzmenkov
2489b6af96
cleanup
2021-04-15 19:40:49 +03:00
Alexander Kuzmenkov
3b95b637a5
Merge remote-tracking branch 'origin/master' into HEAD
2021-04-15 18:19:53 +03:00
Vladimir
8c7ffda676
Merge pull request #22753 from ClickHouse/revert-19685-dev_joinon
2021-04-15 12:42:50 +03:00
Nikolai Kochetov
e731dfe650
Merge pull request #22991 from ClickHouse/untuple-and-subquery
...
Fix subquery with untuple.
2021-04-13 09:53:13 +03:00
hexiaoting
77c460e8d1
Merge remote-tracking branch 'origin/master' into dev-sumcount
2021-04-13 11:14:14 +08:00
Nikolai Kochetov
0448e1415f
Fix subquery with untuple.
2021-04-12 15:15:55 +03:00
Ivan
495c6e03aa
Replace all Context references with std::weak_ptr ( #22297 )
...
* Replace all Context references with std::weak_ptr
* Fix shared context captured by value
* Fix build
* Fix Context with named sessions
* Fix copy context
* Fix gcc build
* Merge with master and fix build
* Fix gcc-9 build
2021-04-11 02:33:54 +03:00
Vladimir
9fe20c1628
Revert "Move conditions from JOIN ON to WHERE"
2021-04-07 14:57:20 +03:00
vdimir
3f464595eb
Accurate removing 'join' part for queries to 'Merge' engine
2021-04-01 14:31:57 +03:00
alexey-milovidov
5c15b8a896
Merge branch 'master' into virtualutil
2021-03-30 23:59:44 +03:00
Amos Bird
69204e1d21
Add prefer_column_name_to_alias settings ( #22044 )
2021-03-30 16:51:45 +03:00
Alexey Milovidov
230b2930b7
Merge branch 'master' into virtualutil
2021-03-30 00:43:00 +03:00
hexiaoting
ab2aaa7fe7
Rewriter visitor and add performance test
2021-03-12 15:29:38 +08:00
hexiaoting
055073931a
Fix build error
2021-03-09 17:03:24 +08:00
hexiaoting
9dab51698f
Rewriter fuse logical
2021-03-08 11:58:18 +08:00
vdimir
b0f6f30298
Revert "Refactor join: make IJoin implementations independent from TableJoin"
...
This reverts commit e6406c3f4c
.
2021-03-05 17:34:43 +03:00
vdimir
e6406c3f4c
Refactor join: make IJoin implementations independent from TableJoin
2021-03-05 16:38:49 +03:00
Amos Bird
93b661ad5a
partition id pruning
2021-03-04 19:43:03 +08:00
hexiaoting
4fe75ad168
fix error
2021-03-03 17:18:53 +08:00
hexiaoting
e116346cbb
Merge remote-tracking branch 'origin/master' into dev-sumcount
2021-03-02 10:11:50 +08:00
hexiaoting
16333e9f3a
Suppport fuse aggregate functions:sum/avg/count to sumCount
2021-03-01 18:04:34 +08:00
vdimir
b7c7c97d10
Merge branch 'master' into join-cast-types-v2
2021-03-01 11:42:21 +03:00
alexey-milovidov
0067a3beac
Merge pull request #19801 from ucasFL/ms
...
continue of #19487
2021-02-25 19:12:47 +03:00
vdimir
4c6cde4d53
Merge remote-tracking branch 'upstream/master' into join-cast-types-v2
2021-02-25 16:24:28 +03:00
vdimir
1e37d7c84f
Add comments to TableJoin::inferJoinKeyCommonType
2021-02-19 14:28:41 +03:00
vdimir
3a7eddcf3a
Remove addRequiredLeftColumn, some tests for join on different types
2021-02-19 14:28:40 +03:00