Ilya Golshtein
3766d47f31
ORs in JOINs
2021-09-28 14:11:28 +03:00
Vladimir C
bc7c41efff
Merge pull request #26657 from hexiaoting/fuse_quantile
2021-09-21 12:33:07 +03:00
Maksim Kita
de20e04dfd
Added executable user defined functions
2021-09-17 18:42:59 +03:00
vdimir
a3304a87a4
Rename optimize_syntax_fuse_aggregate -> optimize_syntax_fuse_functions
2021-09-14 15:27:12 +03:00
vdimir
a1463d5719
Merge remote-tracking branch 'origin/master' into fuse_quantile
2021-09-14 15:23:06 +03:00
vdimir
5a1aeeb044
Use optimize_syntax_fuse_aggregate
instead of optimize_fuse_sum_count_avg
and optimize_fuse_quantile
2021-09-14 15:21:16 +03:00
vdimir
a3db56f056
Revert "fuse multi setting options into one when Optimize"
...
This reverts commit bbd7799375
.
2021-09-14 15:12:21 +03:00
vdimir
3d2d994c5d
Skip JOIN OR/USING sections in replaceAliasColumnsInQuery
2021-09-14 14:13:19 +03:00
hexiaoting
bbd7799375
fuse multi setting options into one when Optimize
2021-09-14 18:51:13 +08:00
vdimir
a7f770ecb7
Do not replaceAliasColumnsInQuery for JOIN OR/USING sections
2021-09-14 13:08:20 +03:00
vdimir
c4ffc2879f
Perform join type inference for USING at ExpressionAnalyzer instead of TreeRewriter
2021-09-01 15:05:47 +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
vdimir
30e112d6a6
Do not convert join key columns for storage/dict join
2021-08-31 15:27:43 +03:00
Maksim Kita
01682a86b3
Updated user defined functions implementation
2021-08-19 00:54:55 +03:00
vdimir
910787c5b6
Improve aliased_column_distributed_bug, fix check
2021-08-16 18:04:20 +03:00
vdimir
db187c6b2d
Fix aliased_column_distributed_bug
2021-08-16 17:26:14 +03:00
Anton Popov
9a9aebc644
fix tests
2021-08-04 20:38:10 +03:00
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