Commit Graph

2646 Commits

Author SHA1 Message Date
9a74ad1702 [feature](Nereids)add the ability of projection on each ExecNode and add column prune on OlapScan (#11842)
We have added logical project before, but to actually finish the prune to reduce the data IO, we need to add related supports in translator and BE.
This PR:
- add projections on each ExecNode in BE
- translate PhysicalProject into projections on PlanNode in FE
- do column prune on ScanNode in FE

Co-authored-by: HappenLee <happenlee@hotmail.com>
2022-08-30 16:17:10 +08:00
fb27e3ef31 [fix](planner) let OlapScanNode turn off preaggragation when there is a filter on DELETE_SIGN (#12118)
We can skip aggregate on replace column, otherwise it would generate
wrong result. e.g. a row in UNIQUE is deleted by delte_sign_column,
then it would be returned.
2022-08-30 15:54:37 +08:00
2715ff9e0f [Enhancement](select) Make select variables request handled in fe without be to avoid potential blocked problem when login (#12111) 2022-08-29 23:07:30 +08:00
580b8dd3ec [improve](Nereids)make some DataType's constructor's access level to private (#12143)
include these types:
- NullType
- BooleanType
- TinyIntType
- SmallIntType
- IntegerType
- BigIntType
- LargeIntType
- FloatType
- DoubleType
- DateType
- DateTimeType
- StringType
2022-08-29 21:21:24 +08:00
47c89d49f0 [fix](array-type) array can not be distributed key and aggregation key (#12082)
Array column should not be distributed key or group by or aggregate key, we should forbid it before create table.
Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-08-29 17:29:23 +08:00
b2c85d753f Revert "[behavior change](planner)change Doris's query organization syntax to standard sql (#9745)" (#12135)
Reverts apache/doris#9745
This may cause NPE when calling `parseDefineExprWithoutAnalyze()`
2022-08-29 16:29:09 +08:00
Fy
c0b56400ed [feature](nereids)support one expression-rewrite rule: inPredicateToEqualTo (#12046)
Add one expression rewrite rule:
rewrite InPredicate to an EqualTo Expression, if there exists exactly one element in InPredicate Options.

Examples:
1. where A in (x) ==> where A = x
2. where A not in (x) ==> where not A = x
2022-08-29 15:54:06 +08:00
1d9d99c8ec [fix](Nereids)join output order need same with child plan node output when translate (#12130)
In BE, There is an implicit convention that HashJoinNode's left child's output Slot must before right child's output slot in intermediateTuple.

However, after we do commute rule on join plan in Nereids, this convention will be broken and cause core dump in BE.

There are two way to fix this problem:
1. add a project on join after we do commute
2. reorder output of join node when we do translate

Since we cannot translate project yet because BE projection support is on going(#11842). So we use second way to fix it now. After the project translation could work correctly, we should use the first way to fix it.
2022-08-29 15:32:55 +08:00
af09c1f4eb [Improvement](window funnel) restrict timestamp to datetime type in window funnel (#12123) 2022-08-29 12:14:04 +08:00
3ca6f34c87 [fix](view) Fix view not showing specific lengths for varchar type (#12107) 2022-08-29 12:09:48 +08:00
Pxl
7829c21b20 [Bug](lateral-view) fix some conjunct not work on lateral view #12105 2022-08-29 12:08:20 +08:00
fb7c42a4e3 [fix](fe) Fixed alterOp from HashSet to EnumSet (#12094)
Change the HashSet to EnumSet of the AlterOp's currentOps for better performance
2022-08-29 12:07:31 +08:00
eb3e0b2f7d [test](Nereids): add more plan equals test for Nereids (#12127)
- add more plan equals test for Nereids
- fix join equals bugs
2022-08-29 11:46:30 +08:00
fe9767941d [fix](array-type) adjust enable_array_type config (#12071)
Problem:
1. `enable_array_type` is masterOnly;
2. dynamic open config only affect FE MASTER
`admin set frontend config("enable_array_type"="true");`
3. query in FE FOLLOWER will fail, because of `enable_array_type` is false in FE FOLLOWER
`select * from table_with_array `

Solution:
Only check `enable_array_type` while creating new tables with array column.

Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-08-29 11:10:52 +08:00
7fbcf3c8ba [api-change](http) change kill query http api by using query id (#12120)
Now user can cancel query id by http by following steps:

Get query id by trace id
cancel query by query id
The modified api has not been released yet.
2022-08-29 09:51:51 +08:00
acd7ab379d [feature](Nereids)add range partition prune (#11964)
1. Rewrite Filter(Project) to Project(Filter) to make sure when do partition prune the tree looks like this: Project(Filter(OlapScan)).
2. Enable the MergeConsecutiveProject MergeConsecutiveFilter rules.
3. prune range partition just like what Legacy Planner do.
2022-08-28 23:39:09 +08:00
818afa4c66 [fix](Nereids)fix some problem in CBO. (#12083)
This PR fix three problem in Nereids.
- Add selected index, partition and tablet Info in LogicalOlapScan
- with JoinReorderContext in new LogicalJoin
- fix compute data size when no column size info in StatsCaculator
2022-08-26 18:52:59 +08:00
4636d6c476 [enhancement](Nereids)merge consecutive LogicalLimit plan (#12096)
This rule aims to merge consecutive limits.

LogicalLimit(limit=10, offset=4)
+---LogicalLimit(limit=3, offset=5)

transformed to

LogicalLimit(limit=3, offset=5)

where

newLimit.limit    = min(topLimit.limit, bottomLimit.limit)
newLimit.offset = bottomLimit.offset
topLimit.offset  is ignored
2022-08-26 15:53:44 +08:00
Pxl
3af0745c8f [Bug](function) fix aggFnParams set not correct (#12006) 2022-08-26 14:29:56 +08:00
7b83308ffc [fix](planner) fix rewrite subquery error (#12075) 2022-08-26 14:29:14 +08:00
89d6f1231f [fix](projection)join node should always output at least one column (#12080) 2022-08-26 12:15:51 +08:00
ccff3f5711 [bugfix](light weight schema change) support delete condition in schema change (#11869)
* [bugfix](light weight schema change) support delete condition in schema change


Co-authored-by: yiguolei <yiguolei@gmail.com>
2022-08-26 11:45:55 +08:00
0f4a1e811b [Enhancement](table_function) table function node enhancement (#12038)
* table function node enhancement

* also avoid copy for non-vec table function node

* fix table function node output slots calculation while lateral view involves subquery

Co-authored-by: cambyzju <zhuxiaoli01@baidu.com>
2022-08-26 10:37:15 +08:00
de148465bc [feature-wip](unique-key-merge-on-write) unique key table with MOW supports update (#11882) 2022-08-26 09:44:37 +08:00
e5bfbbe761 [feature-wip](unique-key-merge-on-write) support alter table column for MoW (#12052) 2022-08-26 09:40:11 +08:00
98d82915d3 [fix](bdbje) add reserved disk config to avoid too many reserved bdbje files (#12043) 2022-08-26 08:12:27 +08:00
e3ab2caef8 [improvement](sink) Support local exchange for multi fragment instances (#12017) 2022-08-25 19:28:23 +08:00
f19c344328 [behavior change](planner)change Doris's query organization syntax to standard sql (#9745) 2022-08-25 17:17:13 +08:00
588dc5f12a [feature](cold_on_s3) Show remote data usage via SHOW BACKENDS and SHOW TABLETS statements (#11450) 2022-08-25 15:36:15 +08:00
aec24d4da1 [feature](http) get create table stmt for a given query (#11979)
This API can help user to get all create table statement of a given SQL.
So that it will be easier to run the case in other Doris cluster.
See document for details
2022-08-25 15:02:05 +08:00
4017f64994 [feature](Nereids) support non-equal predicates in Join (#11812)
Currently, the join on conditions are denoted by Join.conditions as one expression.
It is not convenient to get equal-predicates for hash table.

This pr add a rule FindHashConditionForJoin to split on-conditions into two parts:
- hashJoinPredicates
- otherJoinConditions
And store them as two attributes in LogicalJoin and PhysicalJoin.

JoinReorder rule is impacted by this change, since the way we get the equal conditions between join children are changed.
In this pr, we changed the output of multiJoin slightly. Equations like A=1 are moved from join condition to upper filter.
For more detail, refer to fe/fe-core/src/test/java/org/apache/doris/nereids/datasets/ssb/SSBJoinReorderTest.java.
2022-08-25 11:08:31 +08:00
6e6de1853c [Bug](ctas): Ctas use default DEFAULT CURRENT_TIMESTAMP insert error (#12056) 2022-08-25 09:00:00 +08:00
0a450d96a5 [Fix] fix cast(array<not_null> as array<>) causes be core dump (#11649) 2022-08-24 22:51:30 +08:00
5219d2aab0 [fix](union)the result exprs of union node should substitute by child node's smap (#11933)
union node's result exprs should be substitued by child node's smap first, then the following "computePassthrough" method would have correct information to do its job.
2022-08-24 19:43:40 +08:00
b32aac9195 [feature](Nereids)add normalize aggregate rule (#12013) 2022-08-24 18:30:18 +08:00
2057edbea0 [fix](ut) Fix fe ut npe for DeleteHandlerTest (#12033) 2022-08-24 18:09:02 +08:00
b619bb2000 [enhancement](ldap) optimize LDAP authentication. (#11948)
* [enhancement](ldap) optimize LDAP authentication.

1. Support caching LDAP user information.
2. HTTP authentication supports LDAP.
3. LDAP temporary users support default user property.
4. LDAP configuration supports the `admin show config` and `admin set config` commands.
2022-08-24 17:08:14 +08:00
d87ab69ead [bug](vectorized) fix bug of tuple is null null side do not set (#12012) 2022-08-24 16:19:43 +08:00
8b4f693ad5 [fix](grouping)fix grouping function bug (#11861) 2022-08-24 15:05:25 +08:00
81b6c8d9f9 [fix](sort)the sort expr nullable info is wrong in some case (#12003) 2022-08-24 14:26:09 +08:00
f737ff742e [enhancement](Nereids)support max function (#11795)
- add aggregate function max to Nereids
- add function P0 regression test for Nereids
2022-08-24 10:54:51 +08:00
568f596330 [fix](agg)grouping_id function in having is not correctly substituted (#11834) 2022-08-24 08:50:28 +08:00
d7ffb4e26e [deps](httpv2)upgrade springboot version to 2.7.3 (#11963) 2022-08-24 08:49:57 +08:00
477899af8e [fix](having) Fix the with as clause containing having caused a null pointer (#12007) 2022-08-24 08:48:49 +08:00
c72a84f7c5 [fix](join)the hash join node would get the wrong nullable if the child node is cross join node (#11971)
* [fix](join)the hash join node would get the wrong nullable if the child node is cross join node
2022-08-24 08:47:52 +08:00
dac0883635 [chore](checkstyle)forbidden import all kind of relocated guava (#12018) 2022-08-24 08:47:13 +08:00
83391dc603 [fix](auth) no need to degrade USAGE_PRIV in userPrivTable (#12016) 2022-08-24 08:46:56 +08:00
5c3367b67d [Bug](ctas/ctl): Ctas and ctl default value error (#12015) 2022-08-24 08:46:43 +08:00
76028265e8 [refactor](Nereids): merge rewrite job (#11950)
merge rewrite job
2022-08-23 20:06:34 +08:00
30a13c8141 [Bug](error code) fix db access error code msg #11962
Co-authored-by: wuhangze <wuhangze@jd.com>
2022-08-23 14:15:58 +08:00